aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade/inc/Components.hpp
blob: 85da5a56f765d3269d880057928df1d95bc585fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "Components.h"
#include <iostream>

template<typename T>
BehaviourWrapper<T>::BehaviourWrapper()  : instance() {}

template<typename T>
void BehaviourWrapper<T>::onStart() {
	instance.onStart();
}

template<typename T>
void BehaviourWrapper<T>::onUpdate() {
	instance.onUpdate();
}

template<typename T>
void BehaviourScript::addScript() {
	behaviour = std::make_unique<BehaviourWrapper<T>>();
}