The interface to implement for receiving TrackEntry events. It is always safe to call AnimationState methods when receiving events.

See TrackEntry {@link TrackEntry#setListener(AnimationStateListener)} and AnimationState {@link AnimationState#addListener(AnimationStateListener)}.

Methods

start(entry:TrackEntry):Void

Invoked when this entry has been set as the current entry. {@link #end(TrackEntry)} will occur when this entry will no longer be applied.

interrupt(entry:TrackEntry):Void

Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for mixing.

end(entry:TrackEntry):Void

Invoked when this entry will never be applied again. This only occurs if this entry has previously been set as the current entry ({@link #start(TrackEntry)} was invoked).

dispose(entry:TrackEntry):Void

Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry.

References to the entry should not be kept after dispose is called, as it may be destroyed or reused.

complete(entry:TrackEntry):Void

Invoked every time this entry's animation completes a loop. This may occur during mixing (after {@link #interrupt(TrackEntry)}).

If this entry's {@link TrackEntry#getMixingTo()} is not null, this entry is mixing out (it is not the current entry).

Because this event is triggered at the end of {@link AnimationState#apply(Skeleton)}, any animations set in response to the event won't be applied until the next time the AnimationState is applied.

event(entry:TrackEntry, event:Event):Void

Invoked when this entry's animation triggers an event. This may occur during mixing (after {@link #interrupt(TrackEntry)}), see {@link TrackEntry#eventThreshold}.

Because this event is triggered at the end of {@link AnimationState#apply(Skeleton)}, any animations set in response to the event won't be applied until the next time the AnimationState is applied.