19 lines
No EOL
404 B
C++
19 lines
No EOL
404 B
C++
#ifndef _GAMEOBJECT_H
|
|
#define _GAMEOBJECT_H
|
|
|
|
#include <vector>
|
|
|
|
struct GameObject {
|
|
const char* name;
|
|
bool is_top_level;
|
|
|
|
GameObject* parent;
|
|
std::vector<GameObject*> children;
|
|
std::map<std::string, std::vector<std::function<int(int)>>> handlers;
|
|
|
|
void add(GameObject* child);
|
|
std::vector<GameObject*>& get_children();
|
|
GameObject* get(const char* targetedName);
|
|
};
|
|
|
|
#endif |