Jagguar Game Engine
Loading...
Searching...
No Matches
GameObject.hpp
1#ifndef GAMEOBJECT_HPP
2#define GAMEOBJECT_HPP
3
4#include <vector>
5#include <string>
6
7#include "Component.hpp"
8
14public:
20 GameObject(std::string name);
21
26
36 void Update(SDL_Event e, int frame, std::vector<std::string> broadcastList);
37
45 void Render(SDL_Renderer *ren);
46
52 void AddComponent(Component *c);
53
60
66 const std::vector<Component*> ListComponents();
67
73 std::string GetName();
74
75private:
76 std::vector<Component *> m_components;
77 std::string m_name;
78
79};
80
81#endif
Definition: Component.hpp:38
Definition: GameObject.hpp:13
void AddComponent(Component *c)
Definition: GameObject.cpp:13
void Render(SDL_Renderer *ren)
Definition: GameObject.cpp:31
void Update(SDL_Event e, int frame, std::vector< std::string > broadcastList)
Definition: GameObject.cpp:25
std::string GetName()
Definition: GameObject.cpp:41
const std::vector< Component * > ListComponents()
Definition: GameObject.cpp:37
~GameObject()
Definition: GameObject.cpp:7
void RemoveComponent(Component *c)
Definition: GameObject.cpp:17