The Animation Component provides a
play method, which is a proxy to the
play(name [, frameRate] [, loop] [, killOnComplete])
Plays an Animation.
The animation should have previously been created via
If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via
Name Type Argument Default Description
The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'.
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.