Class responsible for managing sprite animations and updating which frame of the animation is to be shown.
More...
#include <objectAnimation.h>
Class responsible for managing sprite animations and updating which frame of the animation is to be shown.
- Author
- Thomas Montano
- Date
- April 13 2020
◆ getCurrentFrame()
int rune::ObjectAnimation::getCurrentFrame |
( |
void |
| ) |
|
Get the frame that the animation is currently on.
- Returns
- Which frame the animation is currently on.
◆ getFrameHeight()
int rune::ObjectAnimation::getFrameHeight |
( |
void |
| ) |
|
Get the height in pixels of each frame on the sprite sheet.
- Returns
- The height in pixels of each frame from the sprite sheet.
◆ getFrameRate()
int rune::ObjectAnimation::getFrameRate |
( |
void |
| ) |
|
Get the frame rate for the animation.
- Returns
- The framerate of the ObjectAnimation.
◆ getFrameWidth()
int rune::ObjectAnimation::getFrameWidth |
( |
void |
| ) |
|
Get the width in pixels of each frame on the sprite sheet.
- Returns
- The width in pixels of each frame from the sprite sheet.
◆ getNumFrames()
int rune::ObjectAnimation::getNumFrames |
( |
void |
| ) |
|
Get the number of frames the animation contains.
- Returns
- The total number of frames that are present in the sprite sheet.
◆ getSheet()
Get the sprite sheet of the animation.
- Returns
- A pointer referencing the texture to be used as the sprite sheet.
◆ setCurrentFame()
void rune::ObjectAnimation::setCurrentFame |
( |
int |
frame | ) |
|
Set the frame that the animation is currently on.
- Parameters
-
frame | The frame that the current animation should be set to. |
◆ setFrameHeight()
void rune::ObjectAnimation::setFrameHeight |
( |
int |
frameHeight | ) |
|
Set the height in pixels of each frame on the sprite sheet.
- Parameters
-
frameHeight | The height in pixels of each frame from the sprite sheet. |
◆ setFrameRate()
void rune::ObjectAnimation::setFrameRate |
( |
int |
frameRate | ) |
|
Set the frame rate for the animation.
- Parameters
-
◆ setFrameWidth()
void rune::ObjectAnimation::setFrameWidth |
( |
int |
frameWidth | ) |
|
Set the width in pixels of each frame on the sprite sheet.
- Parameters
-
frameWidth | The width in pixels of each frame from the sprite sheet. |
◆ setNumFrames()
void rune::ObjectAnimation::setNumFrames |
( |
int |
numFrames | ) |
|
Set the number of frames the animation contains.
- Parameters
-
numFrames | The total number of frames that are present in the sprite sheet. |
◆ setSheet()
void rune::ObjectAnimation::setSheet |
( |
std::string const & |
filePath, |
|
|
unsigned int |
drawMode |
|
) |
| |
Set the sprite sheet of the animation from a texture object.
- Parameters
-
filePath | The file path of the texture to be used as the sprite sheet. |
drawMode | The filtering mode of the sprite. |
The documentation for this class was generated from the following files: