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
-
delay
Delay 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-null
Array
framesEach element in it should be an instance of SpriteFrame
Optional
float
delayDelay between frames in seconds. Default is 1.0/60.
Functions
addFrame(frame)
Append a frame into the animation.
void
addFrame(SpriteFrame frame)Parameters
Non-null
SpriteFrame frame