A reference to the Game Object that owns this AnimationManager.
Adds a new animation under the given key.
Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function.
The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.
The speed at which the animation should play. The speed is given in frames per second.
Whether or not the animation is looped or just plays once.
Are the given frames using numeric indexes (default) or strings?
The currently displayed animation, if any.
The currently displayed Frame of animation, if any.
The currently displayed Frame of animation, if any. This property is only set once an Animation starts playing. Until that point it remains set as null.
Destroys all references this AnimationManager contains.
Destroys all references this AnimationManager contains. Iterates through the list of animations stored in this manager and calls destroy on each of them.
Gets or sets the current frame index and updates the Texture Cache for display.
The current animations FrameData
Gets or sets the current frame name and updates the Texture Cache for display.
The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.
A reference to the currently running Game.
Returns an animation that was previously added by name.
Returns an animation that was previously added by name.
The name of the animation to be returned, e.g. "fire".
The Animation instance, if found, otherwise null.
Set to true once animation data has been loaded.
Gets the current animation name, if set.
Advances by the given number of frames in the current animation, taking the loop value into consideration.
Advances by the given number of frames in the current animation, taking the loop value into consideration.
The number of frames to advance.
Gets and sets the paused state of the current animation.
Play an animation based on the given key.
Play an animation based on the given key. The animation should previously have been added via animations.add If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.
The name of the animation to be played, e.g. "fire", "walk", "jump".
The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.
A reference to playing Animation instance.
Moves backwards the given number of frames in the current animation, taking the loop value into consideration.
Moves backwards the given number of frames in the current animation, taking the loop value into consideration.
The number of frames to move back.
Refreshes the current frame data back to the parent Sprite and also resets the texture data.
Stop playback of an animation.
Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped.
The currentAnim property of the AnimationManager is automatically set to the animation given.
The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.
When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)
Should the animation data continue to update even if the Sprite.visible is set to false.
An array of frames to be validated.
Validate the frames based on their numeric index (true) or string index (false)
True if all given Frames are valid, otherwise false.
The Animation Manager is used to add, play and update Phaser Animations. Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance.
https://phaser.io/docs/2.6.2/Phaser.AnimationManager.html