23 virtual void Update(
float fixedTime);
26 virtual void Render(SDL_Renderer* ren);
29 template <
typename T,
typename... TArgs>
44 #include "GameObject.tpp"
std::string m_tag
Definition: GameObject.hpp:41
std::vector< Component * > m_components
Definition: GameObject.hpp:40
C * GetComponent() const
Get a component.
void AddComponent(TArgs &&...mArgs)
Add a component.
virtual void Render(SDL_Renderer *ren)
Render this object.
Definition: GameObject.cpp:34
virtual void Update(float fixedTime)
update this GameObject on a frame basis
Definition: GameObject.cpp:26
std::string GetTag()
return this game objects tag
Definition: GameObject.cpp:42
~GameObject()
default deconstructor for deallocating components
Definition: GameObject.cpp:8
GameObject(std::string tag)
Definition: GameObject.cpp:4
void RemoveComponent(Component *c)
Remove a component.
Definition: GameObject.cpp:16
Definition: GameObject.hpp:12
Definition: Component.hpp:13