blob: af7572c542bf5ec26a0cc7565bcdbf21edea18f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include "BehaviorScript.h"
#include "Component.h"
#include "GameObject.h"
using namespace crepe;
BehaviorScript::BehaviorScript(game_object_id_t id, Mediator & mediator)
: Component(id),
mediator(mediator) {}
template <>
BehaviorScript & GameObject::add_component<BehaviorScript>() {
ComponentManager & mgr = this->mediator.component_manager;
return mgr.add_component<BehaviorScript>(this->id, this->mediator);
}
|