Skip to main content
1 of 2
Tojra
  • 101
  • 2

Game loop inside game loop(Libgdx)

I want a suggestion for a problem.

So I have the main game loop in Libgdx. On an event (touch()), I want an animation to be executed. So I will have a variable which will store the value which will be updated each frame and further rendered side by side each frame.

The problem: I want an another animation to take place after the first one finishes. How do I update variable to do so. Because it should take place after first. I can't place two statements in loop one after another. Is there a way to create an another game loop inside first so that when inner runs the outer us paused

Tojra
  • 101
  • 2