Class Fz2D.Animation
| Defined in: | src/scene/animation.coffee |
Overview
Public: Animation
Instance Method Summary
- ::constructor(tag, texture, count, delay) Constructor.
- ::onend(animation) On end(ed) callback.
- ::play(looped) Plays the animation.
- ::stop() Stops the animation.
- ::update(timer, input) Updates animation on every frame.
Constructor Details
::constructor(tag, texture, count, delay) Source
Public: Constructor.
tag - name of the animation
texture - Fz2D.Texture
count - number of frames (default: 1)
delay - delay in miliseconds between each frame (default: 1000.0 / count)
Instance Method Details
::onend(animation) Source
Public: On end(ed) callback.
animation - Fz2D.Animation
::play(looped) Source
Public: Plays the animation.
looped - loop state (default: false)
::stop() Source
Public: Stops the animation.
::update(timer, input) Source
Public: Updates animation on every frame.
timer - Fz2D.Timer
input - Fz2D.Input