|
The Game Engine
1
|
An Animation for 2D assets (expand for 3d?) More...
#include <Animation.h>
Collaboration diagram for Animation:Public Member Functions | |
| Animation () | |
| Animation (string animFile) | |
| Animation (string animFile, string name) | |
| void | clear () |
| This removes all the data within an Animation (should only be called when animation is no longer in use) More... | |
| bool | operator== (Animation a) |
| bool | operator!= (Animation a) |
Public Attributes | |
| bool | Built |
| Tells if loading the Animation was successful. More... | |
| unsigned int | NumFrames |
| Number of frames in this Animation. More... | |
| string | Name |
| The name of the Animation. More... | |
| vector< SpriteFrame * > | Frames |
| The frames of the animation. More... | |
Protected Member Functions | |
| bool | loadAnimation (string animFile) |
| Loads the Animations from a file in the specified format. More... | |
An Animation for 2D assets (expand for 3d?)
This class is tasked with the following:
Definition at line 17 of file Animation.h.
| Animation::Animation | ( | ) |
Definition at line 17 of file Animation.cpp.
| Animation::Animation | ( | string | animFile | ) |
| Animation::Animation | ( | string | animFile, |
| string | name | ||
| ) |
| void Animation::clear | ( | ) |
This removes all the data within an Animation (should only be called when animation is no longer in use)
Definition at line 32 of file Animation.cpp.
Here is the call graph for this function:
|
protected |
Loads the Animations from a file in the specified format.
Image File name
Pause time
transparency #'s R G B
AnimationPeg
Collision data
Load image for Frame
Set transparent color
Loads image into animation
sets frame delay and makes sure height and width are correct
Set the animation Peg
Definition at line 49 of file Animation.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 39 of file Animation.h.
|
inline |
Definition at line 38 of file Animation.h.
| bool Animation::Built |
Tells if loading the Animation was successful.
Definition at line 21 of file Animation.h.
| vector<SpriteFrame*> Animation::Frames |
The frames of the animation.
Definition at line 27 of file Animation.h.
| string Animation::Name |
The name of the Animation.
Definition at line 25 of file Animation.h.
| unsigned int Animation::NumFrames |
Number of frames in this Animation.
Definition at line 23 of file Animation.h.