Hello Spiners,
i have a bit trouble with setting the track time.
What i try to do is:
- save current animation time of track x
- set empty animation to track x
and after a while
- set same animation to track x
- set track time to the saved value
This works as intended, animation continues at the point where i stopped it before, but...
there are 2 events at the beginning of the animation and one of them is always fired again, when i continue the animation. Doesn't matter at which point i start to continue.
If i don't stop and just let it play in a loop the events are fired correctly btw.
Did i discover a bug, or did i just mess up with something here?
Spine + libGDX
Code to stop the animation:
meeleSaveTime = animationState.getCurrent(4).getAnimationTime();
animationState.setEmptyAnimation(4, 0.5f);
Code to resume:
animationState.addAnimation(4, "attack", true, 0f).setTrackTime(meeleSaveTime);