addEmptyAnimation method
Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's TrackEntry::getMixDuration(). If the track has no entries, it is equivalent to calling setEmptyAnimation(int, float).
See setEmptyAnimation(int, float) and Empty animations in the Spine Runtimes Guide.
delay If > 0, sets TrackEntry::getDelay(). If < = 0, the delay set is the duration of the previous track entry minus any mix duration plus the specified delay (ie the mix ends at ( delay = 0) or before ( delay < 0) the previous track entry duration). If the previous entry is looping, its next loop completion is used instead of its duration.
Returns A track entry to allow further customization of animation playback. References to the track entry must not be kept after the AnimationStateListener::dispose(TrackEntry) event occurs.
Implementation
TrackEntry addEmptyAnimation(int trackIndex, double mixDuration, double delay) {
final result =
SpineBindings.bindings.spine_animation_state_add_empty_animation(_ptr, trackIndex, mixDuration, delay);
return TrackEntry.fromPointer(result);
}