AnimationState class

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAnimation(int trackIndex, Animation animation, bool loop, double delay) TrackEntry
addAnimationByName(int trackIndex, String animationName, bool loop, double delay) TrackEntry
Adds an animation to be played delay seconds after the current or last queued animation for a track. If the track is empty, it is equivalent to calling setAnimation. @param delay Seconds to begin this animation after the start of the previous animation. May be <= 0 to use the animation duration of the previous track minus any mix duration plus the negative delay.
addEmptyAnimation(int trackIndex, double mixDuration, double delay) TrackEntry
Adds an empty animation to be played after the current or last queued animation for a track, and mixes to it over the specified mix duration. @return A track entry to allow further customization of animation playback. References to the track entry must not be kept after AnimationState.Dispose.
apply(Skeleton skeleton) → void
Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the animation state can be applied to multiple skeletons to pose them identically.
clearTrack(int trackIndex) → void
Removes all animations from the tracks, leaving skeletons in their previous pose. It may be desired to use AnimationState.setEmptyAnimations(float) to mix the skeletons back to the setup pose, rather than leaving them in their previous pose.
clearTracks() → void
Removes all animations from all tracks, leaving skeletons in their previous pose. It may be desired to use AnimationState.setEmptyAnimations(float) to mix the skeletons back to the setup pose, rather than leaving them in their previous pose.
getCurrent(int trackIndex) TrackEntry?
getData() AnimationStateData
getNumTracks() int
getTimeScale() double
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAnimation(int trackIndex, Animation animation, bool loop) TrackEntry
setAnimationByName(int trackIndex, String animationName, bool loop) TrackEntry
Sets the current animation for a track, discarding any queued animations. @param loop If true, the animation will repeat. If false, it will not, instead its last frame is applied if played beyond its duration. In either case TrackEntry.TrackEnd determines when the track is cleared. @return A track entry to allow further customization of animation playback. References to the track entry must not be kept after AnimationState.Dispose.
setEmptyAnimation(int trackIndex, double mixDuration) TrackEntry
Sets an empty animation for a track, discarding any queued animations, and mixes to it over the specified mix duration.
setEmptyAnimations(double mixDuration) → void
Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration.
setListener(AnimationStateListener? listener) → void
setTimeScale(double timeScale) → void
toString() String
A string representation of this object.
inherited
update(double delta) → void
Increments the track entry times, setting queued animations as current if needed @param delta delta time

Operators

operator ==(Object other) bool
The equality operator.
inherited