Initialize Animations object.
An object with x and y properties.
Add a new animation by name, using specified frames and timing.
Overrides existing animation if the same name is used.
The animation name.
Sprite frames used in the animation.
How quickly to change between frames (based upon delta time).
Set the named animation as the current animation and reset it.
The name of the animation to play.
Stop the current animation.
Update the current animation if one is set.
Called by [TileSprite.update()]{@link TileSprite#update}.
Delta time since last update.
Handles animations for an object.
Example
// In the implementation of a class this.anims = new Animations({ x: 0, y: 0, custom: 'properties' }) // Create 'idle' animation with two frames that change every half second. this.anims.add('idle', [{ x: 0, y: 0 }, { x: 1, y: 0}], .5) // In the update of the same class this.anims.play('idle')