-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBaseState.angelscript
56 lines (46 loc) · 991 Bytes
/
BaseState.angelscript
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
46
47
48
49
50
51
52
53
54
55
56
class BaseState : State
{
private GameControllerManager m_controllerManager;
private UILayerManager m_layerManager;
void loadScene(const string &in sceneName)
{
LoadScene(sceneName, PRELOOP, LOOP, ONRESUME);
}
void loadScene(const string &in sceneName, const vector2 &in bucketSize)
{
LoadScene(sceneName, PRELOOP, LOOP, ONRESUME, bucketSize);
}
void addController(GameController@ controller)
{
m_controllerManager.addController(@controller);
}
void addLayer(UILayer@ layer)
{
m_layerManager.addLayer(@layer);
}
void setCurrentLayer(const string &in layerName)
{
m_layerManager.setCurrentLayer(layerName);
}
void start()
{
}
void preLoop()
{
m_controllerManager.addController(@m_layerManager);
m_controllerManager.addController(FadeInController());
}
void loop()
{
m_controllerManager.update();
m_controllerManager.draw();
}
void onResume()
{
// implements dummy resume function
}
string getName()
{
return "BaseState";
}
}