SpriteComponent class to handle sprite rendering and animation.
More...
#include <SpriteComponent.h>
|
| | SpriteComponent (Textures texture, int zIndex) |
| | Constructor for SpriteComponent.
|
| |
| | SpriteComponent (Textures texture, int xOffset, int yOffset, int zIndex) |
| | zIndex The z-index of the sprite, used for rendering order, in order to show up on the map, the zIndex must be higher than the layer you want it to show up on
|
| |
| | SpriteComponent (const char *path, int xOffset, int yOffset, int zIndex) |
| | zIndex The z-index of the sprite, used for rendering order, in order to show up on the map, the zIndex must be higher than the layer you want it to show up on
|
| |
| | SpriteComponent (Textures texture, bool isAnimated, std::map< std::string, std::unique_ptr< Animation > > *animationList, std::string defaultAnimation, int zIndex) |
| | used for animated sprites
|
| |
SpriteComponent class to handle sprite rendering and animation.
◆ SpriteComponent() [1/4]
| SpriteComponent::SpriteComponent |
( |
Textures | texture, |
|
|
int | zIndex ) |
Constructor for SpriteComponent.
- Parameters
-
| texture | The texture to be used for the sprite, must be a Texture enum |
zIndex The z-index of the sprite, used for rendering order, in order to show up on the map, the zIndex must be higher than the layer you want it to show up on
◆ SpriteComponent() [2/4]
| SpriteComponent::SpriteComponent |
( |
Textures | texture, |
|
|
int | xOffset, |
|
|
int | yOffset, |
|
|
int | zIndex ) |
zIndex The z-index of the sprite, used for rendering order, in order to show up on the map, the zIndex must be higher than the layer you want it to show up on
- Parameters
-
| texture | The texture to be used for the sprite, must be a Texture enum |
| xOffset | The x offset of the sprite, used for rendering position |
| yOffset | The y offset of the sprite, used for rendering position |
◆ SpriteComponent() [3/4]
| SpriteComponent::SpriteComponent |
( |
const char * | path, |
|
|
int | xOffset, |
|
|
int | yOffset, |
|
|
int | zIndex ) |
zIndex The z-index of the sprite, used for rendering order, in order to show up on the map, the zIndex must be higher than the layer you want it to show up on
- Parameters
-
| texture | The texture to be used for the sprite, must be a char* path |
| xOffset | The x offset of the sprite, used for rendering position |
| yOffset | The y offset of the sprite, used for rendering position |
◆ SpriteComponent() [4/4]
| SpriteComponent::SpriteComponent |
( |
Textures | texture, |
|
|
bool | isAnimated, |
|
|
std::map< std::string, std::unique_ptr< Animation > > * | animationList, |
|
|
std::string | defaultAnimation, |
|
|
int | zIndex ) |
used for animated sprites
- Parameters
-
| texture | The texture to be used for the sprite, must be a Texture enum |
| isAnimated | Whether the sprite is animated or not |
| animationList | The list of animations to be used for the sprite |
| defaultAnimation | The default animation to be used for the sprite when it first gets loaded |
| zIndex | The z-index of the sprite, used for rendering order, in order to show up on the map, the zIndex must be higher than the layer you want it to show up on |
The documentation for this class was generated from the following files: