Arcade
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
GameAPI.BudgetBoy.Animation Class Reference

An image with multiple frames of animation that can be played back over a given period of time. More...

Inheritance diagram for GameAPI.BudgetBoy.Animation:
GameAPI.BudgetBoy.Image

Public Member Functions

Image GetFrame (int frameNum)
 Return one of the frames that makes up the animation. More...
 
void Reset ()
 Resets the animation back to the first frame. More...
 
 Animation (params Image[] frames)
 Constructs an animation from a list of Images. More...
 
void Advance (double dt)
 Moves the animation forward by the specified amount of time. More...
 

Properties

double Progress [get, set]
 A value interpolated between 0 for the start of the animation and 1 for the end. More...
 
int NumFrames [get]
 Total number of frames. More...
 
double Period [get, set]
 Total duration of the animation in seconds. More...
 
bool IsPaused [get, set]
 Animation doesn't progress while this is true. Compliments IsPlaying. More...
 
bool IsPlaying [get, set]
 Animation progresses while this is true. Compliments IsPaused. More...
 
bool IsLooping [get, set]
 If true, the animation will restart from the beginning automatically when it ends. More...
 
bool IsComplete [get]
 Returns true if the animation is non-looping and has ended. More...
 
int Frame [get, set]
 Gets or sets the current animation frame. More...
 
- Properties inherited from GameAPI.BudgetBoy.Image
Vector2I Size [get]
 Returns the width/height of the image. More...
 
int Width [get]
 Horizontal resolution in pixels. More...
 
int Height [get]
 Vertical resolution in pixels. More...
 
int Area [get]
 Product of the width and height. More...
 

Events

EventHandler Completed
 Event called when a non-looping animation has finished playing. More...
 

Detailed Description

An image with multiple frames of animation that can be played back over a given period of time.

Constructor & Destructor Documentation

GameAPI.BudgetBoy.Animation.Animation ( params Image[]  frames)
inline

Constructs an animation from a list of Images.

Parameters
framesThe Images for each frame of the animation.

Member Function Documentation

void GameAPI.BudgetBoy.Animation.Advance ( double  dt)
inline

Moves the animation forward by the specified amount of time.

Parameters
dtThe amount of time (in seconds) to advance.
Image GameAPI.BudgetBoy.Animation.GetFrame ( int  frameNum)
inline

Return one of the frames that makes up the animation.

void GameAPI.BudgetBoy.Animation.Reset ( )
inline

Resets the animation back to the first frame.

Property Documentation

int GameAPI.BudgetBoy.Animation.Frame
getset

Gets or sets the current animation frame.

bool GameAPI.BudgetBoy.Animation.IsComplete
get

Returns true if the animation is non-looping and has ended.

bool GameAPI.BudgetBoy.Animation.IsLooping
getset

If true, the animation will restart from the beginning automatically when it ends.

bool GameAPI.BudgetBoy.Animation.IsPaused
getset

Animation doesn't progress while this is true. Compliments IsPlaying.

bool GameAPI.BudgetBoy.Animation.IsPlaying
getset

Animation progresses while this is true. Compliments IsPaused.

int GameAPI.BudgetBoy.Animation.NumFrames
get

Total number of frames.

double GameAPI.BudgetBoy.Animation.Period
getset

Total duration of the animation in seconds.

double GameAPI.BudgetBoy.Animation.Progress
getset

A value interpolated between 0 for the start of the animation and 1 for the end.

Event Documentation

EventHandler GameAPI.BudgetBoy.Animation.Completed

Event called when a non-looping animation has finished playing.