Animation#play()

play(frameRate, loop, killOnComplete) → {Phaser.Animation}

Plays this animation.

Parameters
Name Type Argument Default Description
frameRate number <optional>
null

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.

loop boolean <optional>
false

Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.

killOnComplete boolean <optional>
false

If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.

Returns
  • A reference to this Animation instance.
Source code: animation/Animation.js (Line 167)
doc_phaser
2017-02-14 10:35:55
Comments
Leave a Comment

Please login to continue.