aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade/inc/GameObjectMax.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'mwe/ecs-homemade/inc/GameObjectMax.hpp')
-rw-r--r--mwe/ecs-homemade/inc/GameObjectMax.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/mwe/ecs-homemade/inc/GameObjectMax.hpp b/mwe/ecs-homemade/inc/GameObjectMax.hpp
new file mode 100644
index 0000000..1e952ba
--- /dev/null
+++ b/mwe/ecs-homemade/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)...);
+}