-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode3.js
More file actions
81 lines (50 loc) · 1.79 KB
/
code3.js
File metadata and controls
81 lines (50 loc) · 1.79 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
gdjs.PauseCode = {};
gdjs.PauseCode.GDPausedObjects1= [];
gdjs.PauseCode.GDPausedObjects2= [];
gdjs.PauseCode.conditionTrue_0 = {val:false};
gdjs.PauseCode.condition0IsTrue_0 = {val:false};
gdjs.PauseCode.condition1IsTrue_0 = {val:false};
gdjs.PauseCode.eventsList0 = function(runtimeScene) {
{
gdjs.PauseCode.condition0IsTrue_0.val = false;
{
gdjs.PauseCode.condition0IsTrue_0.val = gdjs.evtTools.input.wasKeyReleased(runtimeScene, "Escape");
}if (gdjs.PauseCode.condition0IsTrue_0.val) {
{gdjs.evtTools.runtimeScene.popScene(runtimeScene);
}}
}
};gdjs.PauseCode.eventsList1 = function(runtimeScene) {
{
gdjs.PauseCode.condition0IsTrue_0.val = false;
{
gdjs.PauseCode.condition0IsTrue_0.val = gdjs.evtTools.runtimeScene.sceneJustBegins(runtimeScene);
}if (gdjs.PauseCode.condition0IsTrue_0.val) {
{gdjs.evtTools.sound.continueMusicOnChannel(runtimeScene, 1);
}}
}
{
{
{ //Subevents
gdjs.PauseCode.eventsList0(runtimeScene);} //End of subevents
}
}
{
{
gdjs.copyArray(runtimeScene.getObjects("Paused"), gdjs.PauseCode.GDPausedObjects1);
{for(var i = 0, len = gdjs.PauseCode.GDPausedObjects1.length ;i < len;++i) {
gdjs.PauseCode.GDPausedObjects1[i].setX(gdjs.evtTools.window.getGameResolutionWidth(runtimeScene) / 2 - (gdjs.PauseCode.GDPausedObjects1[i].getWidth()) / 2);
}
}{for(var i = 0, len = gdjs.PauseCode.GDPausedObjects1.length ;i < len;++i) {
gdjs.PauseCode.GDPausedObjects1[i].setY(gdjs.evtTools.window.getGameResolutionHeight(runtimeScene) / 2 - (gdjs.PauseCode.GDPausedObjects1[i].getHeight()) / 2);
}
}}
}
};
gdjs.PauseCode.func = function(runtimeScene) {
runtimeScene.getOnceTriggers().startNewFrame();
gdjs.PauseCode.GDPausedObjects1.length = 0;
gdjs.PauseCode.GDPausedObjects2.length = 0;
gdjs.PauseCode.eventsList1(runtimeScene);
return;
}
gdjs['PauseCode'] = gdjs.PauseCode;