summaryrefslogtreecommitdiff
path: root/engine/src/Context.cpp
blob: 8c81c898cae226956d64f71f6637db653d16166c (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
34
35
36
37
38
39
40
41
42
43
44
45
#include <kurator/engine/Context.h>

#include <entt/entity/registry.hpp>
#include <entt/signal/dispatcher.hpp>

#include <kurator/engine/Camera.h>
#include <kurator/engine/Clock.h>


namespace kurator
{
namespace engine
{


Context::Context(entt::registry& registry_, entt::dispatcher& dispatcher_, Clock& clock_, Camera& camera_) :
	registry {registry_},
	dispatcher {dispatcher_},
	clock {clock_},
	camera {camera_}
{
}


Context::operator ConstContext() const
{
	return ConstContext{registry, dispatcher, clock, camera};
}


ConstContext::ConstContext(
	const entt::registry& registry_,
	const entt::dispatcher& dispatcher_,
	const Clock& clock_,
	const Camera& camera_) :
	registry {registry_},
	dispatcher {dispatcher_},
	clock {clock_},
	camera {camera_}
{
}


}  // namespace engine
}  // namespace kurator