class spinehx.AnimationState

Available on all platforms

Stores state for an animation and automatically mixes between animations.

Instance Fields

function new(data:AnimationStateData):Void

function addAnimation(animation:Animation, loop:Bool, delay:Float):Void

Adds an animation to be played delay seconds after the current or last queued animation. *

delay

May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay.

function addAnimationByName(animationName:String, loop:Bool, delay:Float):Void

@see #addAnimation(Animation, boolean, float)

function addAnimationByNameSimple(animationName:String, loop:Bool):Void

@see #addAnimation(Animation, boolean)

function addAnimationSimple(animation:Animation, loop:Bool):Void

Adds an animation to be played delay seconds after the current or last queued animation, taking into account any mix * duration.

function apply(skeleton:Skeleton):Void

function clearAnimation():Void

function clearQueue():Void

function getAnimation():Animation

returns

May be null.

function getTime():Float

Returns the time within the current animation.

function isComplete():Bool

Returns true if no animation is set or if the current time is greater than the animation duration, regardless of looping.

function setAnimation(animation:Animation, loop:Bool):Void

Set the current animation. Any queued animations are cleared and the current animation time is set to 0. *

animation

May be null.

function setAnimationByName(animationName:String, loop:Bool):Void

@see #setAnimation(Animation, boolean)

function setTime(time:Float):Void

function toString():String

function update(delta:Float):Void