Class: Phaser::Animation
- Inherits:
-
Object
- Object
- Phaser::Animation
- Includes:
- Native
- Defined in:
- lib/opal/phaser/core/animation.rb
Overview
An Animation instance contains a single animation and the controls to play it. It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.
Instance Attribute Summary collapse
-
#native ⇒ Object
Returns the value of attribute native.
Instance Method Summary collapse
-
#initialize(game, parent, name, frameData, frames, frameRate = 60, _loop = false) ⇒ Animation
constructor
A new instance of Animation.
Constructor Details
#initialize(game, parent, name, frameData, frames, frameRate = 60, _loop = false) ⇒ Animation
Returns a new instance of Animation.
18 19 20 21 |
# File 'lib/opal/phaser/core/animation.rb', line 18 def initialize(game, parent, name, frameData, frames, frameRate = 60, _loop = false) @native_game = game @native = `new Phaser.Animation(#@native_game, parent, name, frameData, frames, frameRate, _loop)` end |
Instance Attribute Details
#native ⇒ Object
Returns the value of attribute native.
9 10 11 |
# File 'lib/opal/phaser/core/animation.rb', line 9 def native @native end |