aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/BehaviorScript.cpp10
-rw-r--r--src/crepe/api/BehaviorScript.h17
-rw-r--r--src/crepe/api/CMakeLists.txt5
-rw-r--r--src/crepe/api/Component.h10
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