aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade/inc
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-10-16 13:15:31 +0200
committermax-001 <maxsmits21@kpnmail.nl>2024-10-16 13:15:31 +0200
commitd9889e4501c1f3ebd649b81816e80d1b40d14c87 (patch)
tree3dba5997bca3e2715b12c596a76dd6fae1997269 /mwe/ecs-homemade/inc
parent85514636cbf9ae34afc8d6c863e9760f291e6478 (diff)
Fixed merge issue
Diffstat (limited to 'mwe/ecs-homemade/inc')
-rw-r--r--mwe/ecs-homemade/inc/Components.h33
-rw-r--r--mwe/ecs-homemade/inc/GameObjectMax.h20
2 files changed, 53 insertions, 0 deletions
diff --git a/mwe/ecs-homemade/inc/Components.h b/mwe/ecs-homemade/inc/Components.h
new file mode 100644
index 0000000..98c5fe7
--- /dev/null
+++ b/mwe/ecs-homemade/inc/Components.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <string>
+
+class Component {
+public:
+ Component();
+
+ bool mActive;
+};
+
+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;
+};
diff --git a/mwe/ecs-homemade/inc/GameObjectMax.h b/mwe/ecs-homemade/inc/GameObjectMax.h
new file mode 100644
index 0000000..3029053
--- /dev/null
+++ b/mwe/ecs-homemade/inc/GameObjectMax.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <cstdint>
+#include <string>
+
+class GameObject {
+public:
+ GameObject(std::uint32_t id, std::string name, std::string tag, int layer);
+
+ template <typename T, typename... Args>
+ void AddComponent(Args &&... args);
+
+ std::uint32_t mId;
+ std::string mName;
+ std::string mTag;
+ bool mActive;
+ int mLayer;
+};
+
+#include "GameObjectMax.hpp"