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; }
63 SpriteComponent(
const char* path,
int xOffset,
int yOffset,
int zIndex);
73 std::map<std::string, std::unique_ptr<Animation>>* animationList,
74 std::string defaultAnimation,
79 void setMapTileTexture(
const char* path);
82 void update(uint_fast16_t diffTime)
override;
84 void playAnimation(std::string type);
85 void setDirection(Direction direction);
SpriteComponent(Textures texture, int zIndex)
Constructor for SpriteComponent.
Definition SpriteComponent.cpp:18
Forward declaration of the Textures enum class.