LibGDX delayed animation

myActor is the Actor needs to be animated 

 

without delay :

Show Plain Text
  1. myActor.addAction(Actions.moveTo(20, 30, 0.5f, Interpolation.fade));
  2.  

 

 

With 0.4 sec delay

Show Plain Text
  1. DelayAction delay = Actions.delay(0.4f);
  2. delay.setAction(Actions.moveTo(20, 30, 0.5f, Interpolation.fade));
  3. delay.setActor(myActor);
  4.  
  5. myActor.addAction(delay);
comments powered by Disqus