aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ScriptSystem.cpp
blob: e40909e96e2dc5d9a92075cc3c074c443dedd4e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <vector>
#include "ComponentManager.h"
#include "api/BehaviorScript.h"
#include "util/fmt.h"
#include "util/log.h"

#include "ScriptSystem.h"

using namespace crepe;

ScriptSystem::ScriptSystem() {
	dbg_trace();
}
ScriptSystem::~ScriptSystem() {
	dbg_trace();
}

ScriptSystem & ScriptSystem::get_instance() {
	static ScriptSystem instance;
	return instance;
}

void ScriptSystem::update() {
	using namespace std;
	dbg_trace();

	ComponentManager & mgr = ComponentManager::get_instance();
	vector<reference_wrapper<api::BehaviorScript>> scripts = mgr.get_components_by_type<api::BehaviorScript>();

	dbg_logf("script count: %lu", scripts.size());

}