If animation A is playing and you use AnimationState addAnimation
to play animation B after a delay with no mix duration, B starts after the delay and A ends at that same time.
If you play animation B with a mix duration, B starts after the delay and A continues playing as normal. Once the mix duration is reached, A ends and B continues on.
AnimationStateListener interrupt
is an event that occurs after the delay when B replaces A as the current entry. A doesn't stop playing though, "interrupt" is just the name of that event.
I don't understand "stops looping" and "cancel the loop". Nowhere in the above is looping affected.
If you want your animations to finish at a specific time, you need to queue them appropriately. Eg if A is 1s looping and B is 0.5s and you want to play A for 4s then B for 0.5s with a 0.25s mix duration:
state.setAnimation(0, "A", true);
entry = state.addAnimation(0, "B", false, 4);
entry.mixDuration = 0.25;
That says: A plays, after a 4s delay B begins mixing in over 0.25s. B will reach its animation duration 0.5s from when it started, which is 4.5s from when A started. From 4s to 4.25s A will continue to loop as B mixes in.