diff options
Diffstat (limited to 'source/30-game/GameObject.hpp')
-rw-r--r-- | source/30-game/GameObject.hpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/source/30-game/GameObject.hpp b/source/30-game/GameObject.hpp index 77488b9..f975803 100644 --- a/source/30-game/GameObject.hpp +++ b/source/30-game/GameObject.hpp @@ -2,27 +2,35 @@ #include "EditorAttachment.hpp" #include "Material.hpp" -#include "PodVector.hpp" #include "Renderer.hpp" #include "VertexIndex.hpp" +#include <MacrosCodegen.hpp> +#include <PodVector.hpp> + #include <rapidjson/fwd.h> #include <glm/glm.hpp> #include <glm/gtc/quaternion.hpp> #include <span> #include <vector> +namespace Tags { +enum class GameObjectKind { + KD_Generic, + KD_Player, + KD_SimpleGeometry, + KD_Building, + KD_LevelWrapper, + KD_COUNT, +}; +BRUSSEL_ENUM(GameObjectKind, ToString FromString ExcludeHeuristics); +} // namespace Tags + class GameWorld; class GameObject { public: - enum Kind { - KD_Generic, - KD_Player, - KD_SimpleGeometry, - KD_Building, - KD_LevelWrapper, - KD_COUNT, - }; + using Kind = Tags::GameObjectKind; + using enum Tags::GameObjectKind; private: std::unique_ptr<EditorAttachment> mEditorAttachment; @@ -50,8 +58,6 @@ public: GameObject(GameObject&&) = default; GameObject& operator=(GameObject&&) = default; - static std::string_view ToString(Kind kind); - static Kind FromString(std::string_view name); Kind GetKind() const; GameWorld* GetWorld() const; @@ -92,3 +98,5 @@ public: protected: void SetParent(GameObject* parent); }; + +#include <generated/GameObject.gh.inl> |