6#include "ComponentType.hpp"
26 virtual void Input(
float deltaTime) {}
33 virtual void Update(
float deltaTime) {}
40 virtual void Render(SDL_Renderer* renderer) {}
55 mGameEntity = gameEntity;
68 std::shared_ptr<GameEntity> mGameEntity;
Base class for all components.
Definition Component.hpp:15
virtual void Render(SDL_Renderer *renderer)
Render the game.
Definition Component.hpp:40
virtual ComponentType GetType()=0
Get the type of the component.
virtual void Update(float deltaTime)
Update the game state.
Definition Component.hpp:33
virtual void Input(float deltaTime)
Handle input.
Definition Component.hpp:26
void SetGameEntity(std::shared_ptr< GameEntity > gameEntity)
Set the game entity that the component is attached to.
Definition Component.hpp:54
std::shared_ptr< GameEntity > GetGameEntity()
Get the game entity that the component is attached to.
Definition Component.hpp:63
GameEntity class that represents an entity in the game.
Definition GameEntity.hpp:19