aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-memory-efficient/inc/GameObjectMax.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'mwe/ecs-memory-efficient/inc/GameObjectMax.hpp')
-rw-r--r--mwe/ecs-memory-efficient/inc/GameObjectMax.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/mwe/ecs-memory-efficient/inc/GameObjectMax.hpp b/mwe/ecs-memory-efficient/inc/GameObjectMax.hpp
new file mode 100644
index 0000000..1e952ba
--- /dev/null
+++ b/mwe/ecs-memory-efficient/inc/GameObjectMax.hpp
@@ -0,0 +1,6 @@
+#include "ComponentManager.h"
+
+template <typename T, typename... Args>
+void GameObject::AddComponent(Args&&... args) {
+ ComponentManager::GetInstance().AddComponent<T>(mId, std::forward<Args>(args)...);
+}