blob: 3c7e8679af6bd84762e227d4b56f665cb987ba1e (
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::api {
template <typename T, typename... Args>
T & GameObject::add_component(Args &&... args) {
auto & mgr = ComponentManager::get_instance();
return mgr.add_component<T>(this->id, std::forward<Args>(args)...);
}
} // namespace crepe::api
|