Skip to main content
moved question tag into question text, fixed a couple of typos & prose
Source Link
Pikalek
  • 13.4k
  • 5
  • 49
  • 54

Game loop inside libGDX game loop(Libgdx)

I want a suggestion for a problem.

So I have the main game loop in LibgdxlibGDX. On an eventthe (touch()),touch() event 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 variablevariable 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 usis paused?

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

Game loop inside libGDX game loop

I have the main game loop in libGDX. On the touch() event 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 is paused?

Source Link
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