In other words,
if this is how you normally play animations:
animationState.SetAnimation(0, "attack", false);
you can do this to change the start time right when you play it:
animationState.SetAnimation(0, "attack", false).Time = startTimeInSeconds;
In the example, startTimeInSeconds can be expressed in "frames" if you divide it by 30 (ie, "frame 5" is "5f/30f"), since the Spine dopesheet shows keys in 30 divisions or frames in one second.
SetAnimation
returns a TrackEntry
object. The TrackEntry
object is what AnimationState uses to remember information about the animation playing, what "frame" it's at, what frame it should end, and some other good stuff.
You can also keep a reference to the TrackEntry object if you want to do more stuff to it. You can see what it has here: https://github.com/EsotericSoftware/spi ... te.cs#L258