aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/api/AI.cpp11
-rw-r--r--src/crepe/api/AI.h18
-rw-r--r--src/crepe/api/CMakeLists.txt2
3 files changed, 31 insertions, 0 deletions
diff --git a/src/crepe/api/AI.cpp b/src/crepe/api/AI.cpp
new file mode 100644
index 0000000..6b63216
--- /dev/null
+++ b/src/crepe/api/AI.cpp
@@ -0,0 +1,11 @@
+#include "AI.h"
+
+namespace crepe {
+
+AI::AI(game_object_id_t id, double mass, double max_speed, double max_force)
+ : Component(id),
+ mass(mass),
+ max_speed(max_speed),
+ max_force(max_force) {}
+
+} // namespace crepe
diff --git a/src/crepe/api/AI.h b/src/crepe/api/AI.h
new file mode 100644
index 0000000..b755439
--- /dev/null
+++ b/src/crepe/api/AI.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "Component.h"
+#include "types.h"
+
+namespace crepe {
+
+class AI : public Component {
+public:
+ AI(game_object_id_t id, double mass, double max_speed, double max_force);
+
+public:
+ double mass;
+ double max_speed;
+ double max_force;
+};
+
+} // namespace crepe
diff --git a/src/crepe/api/CMakeLists.txt b/src/crepe/api/CMakeLists.txt
index 50c51ed..d42b459 100644
--- a/src/crepe/api/CMakeLists.txt
+++ b/src/crepe/api/CMakeLists.txt
@@ -23,6 +23,7 @@ target_sources(crepe PUBLIC
Asset.cpp
EventHandler.cpp
Script.cpp
+ AI.cpp
)
target_sources(crepe PUBLIC FILE_SET HEADERS FILES
@@ -58,4 +59,5 @@ target_sources(crepe PUBLIC FILE_SET HEADERS FILES
LoopManager.h
LoopTimer.h
Asset.h
+ AI.h
)