#include <animation.h>
Definition at line 46 of file animation.h.
Public Member Functions | |
Animation () | |
void | addFrame (Image *image, unsigned int delay, int offsetX, int offsetY) |
Appends a new animation at the end of the sequence. | |
void | addTerminator () |
Appends an animation terminator that states that the animation should not loop. | |
Frame * | getFrame (int index) |
Returns the frame at the specified index. | |
unsigned int | getLength () const |
Returns the length of this animation in frames. | |
int | getDuration () const |
Returns the duration of this animation. | |
Static Public Member Functions | |
static bool | isTerminator (const Frame &phase) |
Determines whether the given animation frame is a terminator. | |
Protected Attributes | |
std::vector< Frame > | mFrames |
int | mDuration |
Animation::Animation | ( | ) |
Definition at line 26 of file animation.cpp.
void Animation::addFrame | ( | Image * | image, | |
unsigned int | delay, | |||
int | offsetX, | |||
int | offsetY | |||
) |
void Animation::addTerminator | ( | ) |
Appends an animation terminator that states that the animation should not loop.
Definition at line 39 of file animation.cpp.
Frame* Animation::getFrame | ( | int | index | ) | [inline] |
unsigned int Animation::getLength | ( | ) | const [inline] |
int Animation::getDuration | ( | ) | const [inline] |
bool Animation::isTerminator | ( | const Frame & | phase | ) | [static] |
Determines whether the given animation frame is a terminator.
Definition at line 44 of file animation.cpp.
std::vector<Frame> Animation::mFrames [protected] |
Definition at line 84 of file animation.h.
int Animation::mDuration [protected] |
Definition at line 85 of file animation.h.