Of cause there is a way to stop actions.
- One way would be that you remove the action from your actor with
actor.removeAction(Action action)
. - You can clear your actors actions with
actor.clearActions()
. This does delete all actions. - You can reset your
Action
orSequenceAction
.sequence.reset()
oraction.reset()
- stop updating the Actions at a collision by overriding the
.act(float delta)
of your actor - Else write a
MyAction extends Action
orMyAction extends TemporalAction
type which overrides theupdate (float percent)
and has a boolean for interrupted. If interrupted don't update if not update.
i would recomend take a look into the actions to see how they work and maybe write your own Action that can be interupted. (your own action should be the best because it will be how you like it) Else remove the Action on collision.