![]() |
Space Fighter
A "shmup" game for Computer Programming C++
|
Represents timing and framing values for texture animations. More...
#include <Animation.h>

Public Member Functions | |
| Animation () | |
| virtual | ~Animation () |
| virtual void | Update (const GameTime &gameTime) |
| Updates the animation. | |
| virtual bool | Load (const std::string &path, ResourceManager *pManager) |
| Load the desired animation into memory. | |
| virtual bool | IsCloneable () const |
| Used to determine if the animation is cloneable. | |
| virtual Resource * | Clone () |
| Used to create a clone of the animation. | |
| virtual Region * | GetCurrentFrame () |
| Gets a pointer to the current frame. | |
| virtual int | GetCurrentIndex () |
| Gets the index of the current frame. | |
| virtual Region * | GetFrame (const int index) |
| Gets a pointer to the indexed frame. | |
| virtual Texture * | GetTexture () const |
| Gets a pointer to the texture of the animation. | |
| virtual void | SetTexture (Texture *pTexture) |
| Sets the texture of the animation. | |
| virtual void | SetCurrentFrame (const unsigned int index) |
| Sets the current frame of the animation. | |
| virtual bool | IsPlaying () const |
| Determines if the animation is playing. | |
| virtual void | Play () |
| Starts or resumes the animation. | |
| virtual void | Pause () |
| Pauses the animation. | |
| virtual void | Stop () |
| Stops the animation. | |
| virtual void | SetLoopCount (uint16_t loops=-1) |
| Sets how many times the animation will run before it stops. | |
Public Member Functions inherited from KatanaEngine::Resource | |
| virtual | ~Resource () |
| unsigned short | GetResourceID () const |
| Gets the ID of the resource. | |
Additional Inherited Members | |
Protected Member Functions inherited from KatanaEngine::Resource | |
| void | Split (const std::string &line, const char delimeter, std::vector< std::string > &elements) |
| Splits a string into a vector of strings. | |
| void | ParseComments (std::string &line) |
| Removes c-style, single-line comments from a line of text. | |
| void | TrimLine (std::string &line) |
| Removes white-space at the front and end of a line of text. | |
| ResourceManager * | GetResourceManager () |
| Gets a pointer to the ResourceManager that was used to load the resource. | |
Represents timing and framing values for texture animations.
Definition at line 20 of file Animation.h.
| KatanaEngine::Animation::Animation | ( | ) |
Definition at line 19 of file Animation.cpp.
|
virtual |
Definition at line 29 of file Animation.cpp.
|
virtual |
Used to create a clone of the animation.
Reimplemented from KatanaEngine::Resource.
Definition at line 129 of file Animation.cpp.
|
inlinevirtual |
Gets a pointer to the current frame.
Definition at line 51 of file Animation.h.
|
inlinevirtual |
Gets the index of the current frame.
Definition at line 55 of file Animation.h.
|
inlinevirtual |
Gets a pointer to the indexed frame.
Definition at line 59 of file Animation.h.
|
inlinevirtual |
Gets a pointer to the texture of the animation.
Definition at line 63 of file Animation.h.
|
inlinevirtual |
Used to determine if the animation is cloneable.
Implements KatanaEngine::Resource.
Definition at line 43 of file Animation.h.
|
inlinevirtual |
Determines if the animation is playing.
Definition at line 76 of file Animation.h.
|
virtual |
Load the desired animation into memory.
| path | The path to the desired animation. |
| pManager | A pointer to the resource manager that will manage the animation. |
Implements KatanaEngine::Resource.
Definition at line 62 of file Animation.cpp.
|
inlinevirtual |
Pauses the animation.
Definition at line 82 of file Animation.h.
|
inlinevirtual |
Starts or resumes the animation.
Definition at line 79 of file Animation.h.
|
virtual |
Sets the current frame of the animation.
| index | The index of the frame to set as the current frame. |
Definition at line 113 of file Animation.cpp.
|
inlinevirtual |
Sets how many times the animation will run before it stops.
| loops | The number of loops to play. Setting loops to -1 will make the animation loop infinitely. |
Definition at line 90 of file Animation.h.
|
inlinevirtual |
Sets the texture of the animation.
| pTexture | A pointer to the texture resource. |
Definition at line 67 of file Animation.h.
|
virtual |
Stops the animation.
Definition at line 123 of file Animation.cpp.
|
virtual |
Updates the animation.
| gameTime | A reference to the game time object. |
Definition at line 40 of file Animation.cpp.