diff options
author | jaroWMR <jarorutjes07@gmail.com> | 2024-10-10 07:06:11 +0200 |
---|---|---|
committer | jaroWMR <jarorutjes07@gmail.com> | 2024-10-10 07:06:11 +0200 |
commit | 3f22ea7e41a81d3c818bdeb536f8df7ff352ae0f (patch) | |
tree | 68fc72eb4c11beb5e1c304b9490fce7192d132f3 /src/crepe/api | |
parent | 97621ae53dfc3434cd97e45266bd4f4ac2ef49e1 (diff) | |
parent | 29fb4bda4872bdfe33a2416a239fb62fc0238167 (diff) |
merge with master
Diffstat (limited to 'src/crepe/api')
-rw-r--r-- | src/crepe/api/BehaviorScript.cpp | 10 | ||||
-rw-r--r-- | src/crepe/api/BehaviorScript.h | 17 | ||||
-rw-r--r-- | src/crepe/api/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/crepe/api/Component.h | 10 |
4 files changed, 30 insertions, 12 deletions
diff --git a/src/crepe/api/BehaviorScript.cpp b/src/crepe/api/BehaviorScript.cpp new file mode 100644 index 0000000..2dd933e --- /dev/null +++ b/src/crepe/api/BehaviorScript.cpp @@ -0,0 +1,10 @@ +#include "../util/log.h" + +#include "BehaviorScript.h" + +using namespace crepe::api; + +BehaviorScript::BehaviorScript() { + dbg_trace(); +} + diff --git a/src/crepe/api/BehaviorScript.h b/src/crepe/api/BehaviorScript.h new file mode 100644 index 0000000..e9542c1 --- /dev/null +++ b/src/crepe/api/BehaviorScript.h @@ -0,0 +1,17 @@ +#pragma once + +#include "../Script.h" +#include "../Component.h" + +namespace crepe::api { + +class BehaviorScript : public Script, public Component { + // only allow ComponentManager to instantiate scripts + friend class ComponentManager; + +protected: + BehaviorScript(); +}; + +} + diff --git a/src/crepe/api/CMakeLists.txt b/src/crepe/api/CMakeLists.txt index 9548594..86623de 100644 --- a/src/crepe/api/CMakeLists.txt +++ b/src/crepe/api/CMakeLists.txt @@ -1,9 +1,10 @@ target_sources(crepe PUBLIC # AudioSource.cpp + BehaviorScript.cpp ) target_sources(crepe PUBLIC FILE_SET HEADERS FILES - AudioSource.h - Component.h + # AudioSource.h + BehaviorScript.h ) diff --git a/src/crepe/api/Component.h b/src/crepe/api/Component.h deleted file mode 100644 index d5e0499..0000000 --- a/src/crepe/api/Component.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -namespace crepe::api { - -class Component { -public: - bool active; -}; - -} // namespace crepe::api |