Stop the loop when the game ends
Animate transitions