diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-18 15:34:22 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-18 15:34:22 +0100 |
commit | b92da3c729c8fc7c002cb3acbb75c56cb63bd89e (patch) | |
tree | 454b64d31b7e0c9151da88a0d49ee782565f49e9 /src/crepe/Component.h | |
parent | 8b449e764b5c91cd3cb0c4fa404a290ab295a7ef (diff) | |
parent | 121b64b1cb6cfead5814070c8b0185d3d7308095 (diff) |
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/events
Diffstat (limited to 'src/crepe/Component.h')
-rw-r--r-- | src/crepe/Component.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/crepe/Component.h b/src/crepe/Component.h index 59570bc..5279fb3 100644 --- a/src/crepe/Component.h +++ b/src/crepe/Component.h @@ -2,8 +2,6 @@ #include "types.h" -#include <cstdint> - namespace crepe { class ComponentManager; @@ -15,16 +13,24 @@ class ComponentManager; * components. */ class Component { +public: + //! Whether the component is active + bool active = true; + //! The id of the GameObject this component belongs to + const game_object_id_t game_object_id; + protected: - //! Only the ComponentManager can create components - friend class crepe::ComponentManager; /** * \param id The id of the GameObject this component belongs to */ Component(game_object_id_t id); + //! Only the ComponentManager can create components + friend class ComponentManager; public: virtual ~Component() = default; + +public: /** * \brief Get the maximum number of instances for this component * @@ -34,12 +40,6 @@ public: * \return The maximum number of instances for this component */ virtual int get_instances_max() const { return -1; } - -public: - //! The id of the GameObject this component belongs to - const game_object_id_t game_object_id; - //! Whether the component is active - bool active = true; }; } // namespace crepe |