-
Notifications
You must be signed in to change notification settings - Fork 0
/
ObjectGroundLooping3.class.js
executable file
·259 lines (238 loc) · 10.6 KB
/
ObjectGroundLooping3.class.js
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
var ObjectGroundLooping3 = function() {
var that = new ObjectGround();
that.default_sensor_height = 128;
that.name = 'slope'; // or 'ground'
that.in_air = false;
that.rolling = false;
that.get_state = function() {
};
that.Chill = function() {
var foobar = {};
foobar.id = 0;
foobar.name = 'Chill';
foobar.image = new Image();
foobar.image.src = 'images/GroundLooping3.png';
foobar.breakable = function(foo) { return true; };
foobar.loop = false;
foobar.length = 1;
foobar.frames = [];
foobar.frames[0] = [];
foobar.frames[0].width = 256;
foobar.frames[0].height = 436;
foobar.frames[0].margin = 0;
foobar.enter = function(sm, obj) {
obj.frame = 0;
};
foobar.update = function(sm, obj) {
};
foobar.exit = function(sm) {
};
return foobar;
};
that.heightMaps = Array();
that.angleMaps = Array();
that.heightMaps['floor'] = [
304, 304, 304, 304, 304, 304, 304, 304, 304, 304,
304, 304, 304, 304, 304, 304, 305, 305, 305, 305,
305, 305, 305, 305, 304, 304, 304, 304, 304, 304,
304, 304, 303, 303, 303, 303, 303, 303, 303, 303,
301, 301, 301, 301, 301, 301, 301, 301, 299, 299,
299, 299, 299, 299, 299, 299, 297, 297, 297, 297,
297, 297, 297, 297, 294, 294, 294, 294, 294, 294,
294, 294, 291, 291, 291, 291, 291, 291, 291, 291,
287, 287, 287, 287, 287, 287, 287, 287, 283, 283,
283, 283, 283, 283, 283, 283, 278, 278, 278, 278,
278, 278, 278, 278, 274, 274, 274, 274, 274, 274,
274, 274, 268, 268, 268, 268, 268, 268, 268, 268,
261, 261, 261, 261, 261, 261, 261, 261, 254, 254,
254, 254, 254, 254, 254, 254, 246, 246, 246, 246,
246, 246, 246, 246, 237, 237, 237, 237, 237, 237,
237, 237, 226, 226, 226, 226, 226, 226, 226, 226,
213, 213, 213, 213, 213, 213, 213, 213, 198, 198,
198, 198, 198, 198, 198, 198, 177, 177, 177, 177,
177, 177, 177, 177, 144, 144, 144, 144, 144, 144,
144, 144, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, ];
that.heightMaps['right-wall'] = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 44, 44, 52, 52, 58, 58,
64, 64, 70, 70, 76, 76, 80, 80, 84, 84,
88, 88, 92, 92, 96, 96, 98, 98, 102, 102,
106, 106, 108, 108, 112, 112, 114, 114, 116, 116,
120, 120, 122, 122, 124, 124, 126, 126, 128, 128,
130, 130, 134, 134, 136, 136, 138, 138, 138, 138,
140, 140, 142, 142, 144, 144, 146, 146, 148, 148,
150, 150, 150, 150, 152, 152, 154, 154, 156, 156,
156, 156, 158, 158, 160, 160, 160, 160, 162, 162,
162, 162, 164, 164, 166, 166, 166, 166, 168, 168,
168, 168, 170, 170, 170, 170, 172, 172, 172, 172,
174, 174, 174, 174, 176, 176, 176, 176, 176, 176,
178, 178, 178, 178, 178, 178, 180, 180, 180, 180,
180, 180, 182, 182, 182, 182, 182, 182, 184, 184,
184, 184, 184, 184, 184, 184, 186, 186, 186, 186,
186, 186, 186, 186, 186, 186, 188, 188, 188, 188,
188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
190, 190, 190, 190, 190, 190, 190, 190, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 192, 192, 192, ];
that.heightMaps['ceiling'] = [
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, ];
that.angleMaps['floor'] = [
358, 358, 358, 358, 358, 358, 358, 358, 355, 355,
355, 355, 355, 355, 355, 355, 349, 349, 349, 349,
349, 349, 349, 349, 348, 348, 348, 348, 348, 348,
348, 348, 344, 344, 344, 344, 344, 344, 344, 344,
343, 343, 343, 343, 343, 343, 343, 343, 339, 339,
339, 339, 339, 339, 339, 339, 336, 336, 336, 336,
336, 336, 336, 336, 333, 333, 333, 333, 333, 333,
333, 333, 332, 332, 332, 332, 332, 332, 332, 332,
329, 329, 329, 329, 329, 329, 329, 329, 325, 325,
325, 325, 325, 325, 325, 325, 323, 323, 323, 323,
323, 323, 323, 323, 319, 319, 319, 319, 319, 319,
319, 319, 316, 316, 316, 316, 316, 316, 316, 316,
312, 312, 312, 312, 312, 312, 312, 312, 308, 308,
308, 308, 308, 308, 308, 308, 304, 304, 304, 304,
304, 304, 304, 304, 298, 298, 298, 298, 298, 298,
298, 298, 291, 291, 291, 291, 291, 291, 291, 291,
279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
279, 279, 279, 279, 279, 279, 280, 280, 280, 280,
280, 280, 280, 280, 283, 283, 283, 283, 283, 283,
283, 283, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
360, 360, 360, 360, 360, 360, ];
that.angleMaps['right-wall'] = [
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 324, 324, 328, 328, 331, 331, 333, 333,
335, 335, 337, 337, 338, 338, 339, 339, 340, 340,
341, 341, 342, 342, 342, 342, 343, 343, 343, 343,
343, 343, 344, 344, 335, 335, 333, 333, 333, 333,
331, 331, 329, 329, 327, 327, 326, 326, 325, 325,
325, 325, 324, 324, 323, 323, 321, 321, 320, 320,
318, 318, 318, 318, 317, 317, 317, 317, 317, 317,
313, 313, 313, 313, 313, 313, 313, 313, 311, 311,
311, 311, 309, 309, 307, 307, 307, 307, 307, 307,
307, 307, 307, 307, 305, 305, 305, 305, 302, 302,
302, 302, 302, 302, 302, 302, 299, 299, 299, 299,
299, 299, 299, 299, 297, 297, 297, 297, 297, 297,
297, 297, 294, 294, 294, 294, 294, 294, 291, 291,
294, 294, 291, 291, 291, 291, 291, 291, 291, 291,
287, 287, 287, 287, 287, 287, 287, 287, 287, 287,
284, 284, 284, 284, 287, 287, 284, 284, 284, 284,
284, 284, 281, 281, 281, 281, 281, 281, 281, 281,
281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
281, 281, 281, 281, 281, 281, 277, 277, 277, 277,
277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
274, 274, 274, 274, 274, 274, 274, 274, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
270, 270, 270, 270, 270, 270, ];
that.angleMaps['ceiling'] = [
360, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
540, 540, 540, 540, 540, 540, ];
/*
* Create new State Machine
*/
that.sm = new EngineStateMachine();
that.sm.changeState( that.Chill(), that );
return that;
};