6 #ifndef AIGRAPHICSCOMPONENT_HPP
7 #define AIGRAPHICSCOMPONENT_HPP
16 #include <SDL2_image/SDL_image.h>
53 void LoadImage(std::string filepath, SDL_Renderer *ren);
56 SDL_Renderer *renderer;
58 SDL_Surface *m_spritesheet;
59 SDL_Texture *m_texture;
60 std::map<int, std::vector<int>> map;
65 int widthImg, heightImg, row, col, tempWidth, tempHeight;
66 int tileHeight, tileWidth;
GraphicsComponent class used to flip through frames for a GameEntity.
Definition: AIGraphicsComponent.hpp:21
void ShutDown()
Shutdown function to destroy and free attributes of AIGraphicsComponent.
Definition: AIGraphicsComponent.cpp:25
void Update(GameEntity &entity)
Updates the attributes of AIGraphicsComponent.
Definition: AIGraphicsComponent.cpp:40
void LoadImage(std::string filepath, SDL_Renderer *ren)
Loads image to use for graphics.
Definition: AIGraphicsComponent.cpp:73
AIGraphicsComponent(SDL_Renderer *ren)
Constructor of AIGraphicsComponent.
Definition: AIGraphicsComponent.cpp:8
void StartUp()
StartUp function to Initialize attributes of AIGraphicsComponent.
Definition: AIGraphicsComponent.cpp:21
~AIGraphicsComponent()
Destructor of AIGraphicsComponent.
Definition: AIGraphicsComponent.cpp:17
void Render(GameEntity &entity)
Helps Render the AI Entity of AIGraphicsComponent.
Definition: AIGraphicsComponent.cpp:32
The interface class for different components to inherit.
Definition: Component.hpp:16
Represents an interactable entity in the game that includes Main Character, NPC, Tiles ,...
Definition: GameEntity.hpp:22
The resource manager is responsible for handling and managing resources regarding the game.
Definition: ResourceManager.hpp:23
static ResourceManager & getInstance()
Method used to get instance of ResourceManager class.
Definition: ResourceManager.cpp:8