How do I check if current animation is completed so that I can follow up with another set of animation? For example, I am playing player hurt animation and I want to play some bloods splashing animation (different spritesheet) once the player hurt animation is finished.
You can set OnActionCompleted listener to your Action with Action's method:
/**
* Sets the listener to be invoked when the action is finished.
* @param listener
* @return this
*/
public Action setCompletionListener (final OnActionCompleted listener)
Eventually you can use:
public boolean isDone()
to check if Action execution has finished.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With