diff options
Diffstat (limited to 'src/crepe/GameObject.hpp')
-rw-r--r-- | src/crepe/GameObject.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/crepe/GameObject.hpp b/src/crepe/GameObject.hpp new file mode 100644 index 0000000..5a672cf --- /dev/null +++ b/src/crepe/GameObject.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "GameObject.h" + +#include "ComponentManager.h" + +namespace crepe { + +template <typename T, typename... Args> +void GameObject::AddComponent(Args &&... args) { + ComponentManager::get_instance().AddComponent<T>(mId, std::forward<Args>(args)...); +} + +} + |