AnimationState
Class
Extends Playable
Module: cc
The AnimationState gives full control over animation playback process.
In most cases the Animation Component is sufficient and easier to use. Use the AnimationState if you need full control.
Index
Properties
animator
AnimationAnimator
curves
Object[]
The curves list.
delay
Number
The start delay which represents the number of seconds from an animation's start time to the start of
repeatCount
Number
The animation's iteration count property.
duration
Number
The iteration duration of this animation in seconds.
speed
Number
The animation's playback speed.
wrapMode
WrapMode
Wrapping mode of the playing animation.
time
Number
The current time of this animation in seconds.
clip
AnimationClip
The clip that is being played by this animation state.
name
String
The name of the playing animation.
isPlaying
Boolean
Is playing or paused in play mode?
isPaused
Boolean
Is currently paused? This can be true even if in edit mode(isPlaying == false).
Methods
Details
Properties
animator
curves
The curves list.
delay
The start delay which represents the number of seconds from an animation's start time to the start of
the active interval.
repeatCount
The animation's iteration count property.
A real number greater than or equal to zero (including positive infinity) representing the number of times
to repeat the animation node.
Values less than zero and NaN values are treated as the value 1.0 for the purpose of timing model
calculations.
duration
The iteration duration of this animation in seconds. (length)
speed
The animation's playback speed. 1 is normal playback speed.
wrapMode
Wrapping mode of the playing animation.
Notice : dynamic change wrapMode will reset time and repeatCount property
time
The current time of this animation in seconds.
clip
The clip that is being played by this animation state.
name
The name of the playing animation.
isPlaying
Is playing or paused in play mode?
isPaused
Is currently paused? This can be true even if in edit mode(isPlaying == false).
Methods
constructor
Parameters
onPlay
onPause
onResume
onStop
onError
Parameters
play
Play this animation.
stop
Stop this animation.
pause
Pause this animation.
resume
Resume this animation.
step
Perform a single frame step.