Handles playing of sprite animations and loading of relevant sprite assets.
|duration||The total duration of the animation in seconds.|
|frame||The index of the frame of the pc.Sprite currently being rendered.|
|isPaused||Whether the animation is currently paused.|
|isPlaying||Whether the animation is currently playing.|
|sprite||The current sprite used to play the animation.|
|spriteAsset||The id of the sprite asset used to play the animation.|
|time||The current time of the animation in seconds.|
|pause||Pauses the animation.|
|play||Plays the animation.|
|resume||Resumes the paused animation.|
|stop||Stops the animation and resets the animation to the first frame.|
|end||Fired when the clip stops playing because it reached its ending.|
|loop||Fired when the clip reached the end of its current loop.|
|pause||Fired when the clip is paused.|
|play||Fired when the clip starts playing|
|resume||Fired when the clip is resumed.|
|stop||Fired when the clip is stopped.|
|component||pc.SpriteComponent||The sprite component managing this clip.|
|data||Object||Data for the new animation clip.|
|data.fps||Number||Frames per second for the animation clip.|
|data.loop||Object||Whether to loop the animation clip.|
|data.name||String||The name of the new animation clip.|
|data.spriteAsset||Number||The id of the sprite asset that this clip will play.|
Pauses the animation.
Plays the animation. If it's already playing then this does nothing.
Resumes the paused animation.
Stops the animation and resets the animation to the first frame.
Fired when the clip stops playing because it reached its ending.
Fired when the clip reached the end of its current loop.
Fired when the clip is paused.
Fired when the clip starts playing
Fired when the clip is resumed.
Fired when the clip is stopped.