20 int animationIndex = 0;
22 std::map<std::string, std::unique_ptr<Animation>>* animations =
nullptr;
27 SDL_FRect srcRect, destRect;
31 bool animated =
false;
45 Textures getTexture() {
return this->textureEnum; }
64 SpriteComponent(
const char* path,
int xOffset,
int yOffset,
int zIndex);
89 std::map<std::string, std::unique_ptr<Animation>>* animationList,
90 std::string defaultAnimation,
98 void setMapTileTexture(
const char* path);
100 void init()
override;
101 void update(uint_fast16_t diffTime)
override;
102 void draw()
override;
107 void setDirection(Direction direction);
void playAnimation(std::string type)
By name select which animation should be played (gets looped)
Definition SpriteComponent.cpp:101
SpriteComponent(Textures texture, int zIndex)
Constructor for SpriteComponent.
Definition SpriteComponent.cpp:18
Forward declaration of the Textures enum class.