Animation Class Reference
| Inherits from | JavaScript Object |
| Location | aphid.g2d.Animation |
Overview of Constructors
-
Animation()Creates an animation with empty frames and 1.0/60 seconds delay
-
Animation(frames, [delay])Creates an animation with the specified frames and delay.
Overview of Tasks
Attributes
- Name
-
delayDelay between frames in seconds.
- Type
-
float
- Writability
-
readwrite
Functions
- Signature
-
addFrame(frame)Append a frame into the animation.
- Return Type
-
void
Constructors
Animation(frames, [delay])
Creates an animation with the specified frames and delay.
new Animation(Array frames, [float delay])Parameters
Non-nullArrayframesEach element in it should be an instance of SpriteFrame
OptionalfloatdelayDelay between frames in seconds. Default is 1.0/60.
Functions
addFrame(frame)
Append a frame into the animation.
void addFrame(SpriteFrame frame)Parameters
Non-nullSpriteFrame frame