aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade/inc/Components.hpp
blob: 436a28c26fa7093518da046b33fd785a5c5feb08 (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>>();
}