Skip to content Skip to sidebar Skip to footer

How Is It Possible To Pause An Action Of An Actor In Libgdx?

I added the following action to my actor: this.addAction(sequence(delay(0.5f), alpha(1, 2), delay(2), alpha(0, 2))); Is there an easy way to pause this animation and then continue

Solution 1:

If your actor is only running action, I suggest to stop calling the act() method of the actor. Extend Actor to set a switch if needed.

public void act(){
  if(mUpdateAnimation){
     this.act(delta)
  }
}

Post a Comment for "How Is It Possible To Pause An Action Of An Actor In Libgdx?"