How to create an animation loop that spins for a while and calls another animation, and when another animation starts working, the first one waits for the other to finish, and w