aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Components.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-06 13:22:10 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-06 13:22:10 +0200
commit7c9d3452c99fcb89ea6df55755e90f741b23cf10 (patch)
tree93fab445cd4c0ebb392c2f4def2a0bd32d2709d2 /src/crepe/Components.h
parent02d658a7ed92bacfdaed587102f0d2e5f6c5dc01 (diff)
copy homemade ECS to crepe + correct code style
Diffstat (limited to 'src/crepe/Components.h')
-rw-r--r--src/crepe/Components.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/crepe/Components.h b/src/crepe/Components.h
new file mode 100644
index 0000000..7cb6fbb
--- /dev/null
+++ b/src/crepe/Components.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include <string>
+
+namespace crepe {
+
+class Component {
+public:
+ Component();
+
+ bool mActive;
+};
+
+// TODO: these should be in separate files
+
+class Sprite : public Component {
+public:
+ Sprite(std::string path);
+
+ std::string mPath;
+};
+
+class Rigidbody : public Component {
+public:
+ Rigidbody(int mass, int gravityScale, int bodyType);
+
+ int mMass;
+ int mGravityScale;
+ int mBodyType;
+};
+
+class Colider : public Component {
+public:
+ Colider(int size);
+
+ int mSize;
+};
+
+}