18 int animationIndex = 0;
20 std::map<std::string, std::unique_ptr<Animation>>* animations =
nullptr;
25 SDL_Rect srcRect, destRect;
27 const char* texturePath;
29 bool animated =
false;
39 SpriteComponent(
const char* path,
int xOffset,
int yOffset,
int zIndex);
43 std::map<std::string, std::unique_ptr<Animation>>* animationList,
44 std::string defaultAnimation,
48 void setTexture(
const char* path);
51 void update()
override;
53 void playAnimation(std::string type);
54 void setDirection(Direction direction);