name | type | arguments | description |
---|---|---|---|
key | string | Phaser.Animations.Animation |
The string-based key of the animation to play, or an Animation instance. |
|
frameRate | number | <optional> |
The frame rate of playback in frames per second (default 24 if duration is null) |
duration | number | <optional> |
How long the animation should play for in milliseconds. If not given its derived from frameRate. |
delay | number | <optional> |
Delay before starting playback. Value given in milliseconds. |
repeat | number | <optional> |
Number of times to repeat the animation (-1 for infinity) |
repeatDelay | number | <optional> |
Delay before the animation repeats. Value given in milliseconds. |
yoyo | boolean | <optional> |
Should the animation yoyo? (reverse back down to the start) before repeating? |
showBeforeDelay | boolean | <optional> |
If this animation has a delay, should it show the first frame immediately (true), or only after the delay (false) |
showOnStart | boolean | <optional> |
Should sprite.visible = true when the animation starts to play? |
hideOnComplete | boolean | <optional> |
Should sprite.visible = false when the animation finishes? |
skipMissedFrames | boolean | <optional> |
Skip frames if the time lags, or always advanced anyway? |
startFrame | number | <optional> |
The frame of the animation to start playback from. |
timeScale | number | <optional> |
The time scale to be applied to playback of this animation. |
randomFrame | boolean | <optional> |
Start playback of this animation from a randomly selected frame? |