Inherits from JavaScript Object
Location aphid.g2d.Animation

Overview

Frame based animation.

Overview of Constructors

Overview of Tasks

Attributes

  • Name
  • delay

    Delay between frames in seconds.

  • Type
  • float
  • Writability
  • readwrite

Functions

  • Return Type
  • void

Constructors

Animation()

Creates an animation with empty frames and 1.0/60 seconds delay

new Animation()

Animation(frames, [delay])

Creates an animation with the specified frames and delay.

new Animation(Array frames, [float delay])

Parameters

Non-null Array frames

Each element in it should be an instance of SpriteFrame

Optional float delay

Delay between frames in seconds. Default is 1.0/60.

Attributes

delay

Delay between frames in seconds.

readwrite float delay

Functions

addFrame(frame)

Append a frame into the animation.

void addFrame(SpriteFrame frame)

Parameters

Non-null SpriteFrame frame