NWengine 0.9
|
The Animation class represents a sequence of frames with durations. More...
#include <Animation.h>
Public Member Functions | |
void | AddFrame (Texture *texture, double duration) |
Adds a frame to the animation. | |
void | DeleteFrame (uint16 index) |
Deletes a frame from the animation. | |
void | SetLinearDuration (double totalDuration) |
Sets the duration of each frame to make the animation linear. | |
Public Attributes | |
std::vector< Texture * > | frames |
std::vector< double > | durations |
bool | repeat = false |
The Animation class represents a sequence of frames with durations.
Adds a frame to the animation.
texture | The texture of the frame. |
duration | The duration of the frame in seconds. |
void Animation::DeleteFrame | ( | uint16 | index | ) |
Deletes a frame from the animation.
index | The index of the frame to delete. |
Sets the duration of each frame to make the animation linear.
totalDuration | The total duration of the animation in seconds. |
std::vector<double> Animation::durations |
The durations of each frame in seconds.
std::vector<Texture*> Animation::frames |
The frames of the animation.