This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
game/include/Components/GameObject.hpp

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