blob: 7e6148c7b1bb4c72276a0ab4efa0ac5ad14f24db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#pragma once
#include "../ComponentManager.h"
#include "GameObject.h"
namespace crepe {
template <typename T, typename... Args>
T & GameObject::add_component(Args &&... args) {
ComponentManager & mgr = ComponentManager::get_instance();
return mgr.add_component<T>(this->ID, std::forward<Args>(args)...);
}
} // namespace crepe
|