diff options
Diffstat (limited to 'src/crepe')
-rw-r--r-- | src/crepe/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/crepe/Metadata.cpp | 10 | ||||
-rw-r--r-- | src/crepe/Metadata.h | 22 |
3 files changed, 34 insertions, 1 deletions
diff --git a/src/crepe/CMakeLists.txt b/src/crepe/CMakeLists.txt index d938eb8..9ad1ff9 100644 --- a/src/crepe/CMakeLists.txt +++ b/src/crepe/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(crepe PUBLIC CollisionSystem.cpp Collider.cpp SDLContext.cpp - RenderSystem.cpp + Metadata.cpp ) target_sources(crepe PUBLIC FILE_SET HEADERS FILES @@ -31,6 +31,7 @@ target_sources(crepe PUBLIC FILE_SET HEADERS FILES Collider.h SDLContext.h RenderSystem.h + Metadata.h ) add_subdirectory(api) diff --git a/src/crepe/Metadata.cpp b/src/crepe/Metadata.cpp new file mode 100644 index 0000000..3d1d910 --- /dev/null +++ b/src/crepe/Metadata.cpp @@ -0,0 +1,10 @@ +#include "Metadata.h" + +using namespace crepe; +using namespace std; + +Metadata::Metadata(uint32_t gameObjectId, string name, string tag) : Component(gameObjectId), name(name), tag(tag) {} + +int Metadata::get_instances_max() const { + return 1; +} diff --git a/src/crepe/Metadata.h b/src/crepe/Metadata.h new file mode 100644 index 0000000..2f08476 --- /dev/null +++ b/src/crepe/Metadata.h @@ -0,0 +1,22 @@ +#pragma once + +#include <string> +#include <vector> + +#include "Component.h" + +namespace crepe { + +class Metadata : public Component { +public: + Metadata(uint32_t game_object_id, std::string name, std::string tag); + int get_instances_max() const; + +public: + std::string name; + std::string tag; + uint32_t parent = UINT32_MAX; + std::vector<uint32_t> children; +}; + +} // namespace crepe |