-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
562 lines (562 loc) · 45.2 KB
/
main.ts
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
namespace SpriteKind {
export const astroid = SpriteKind.create()
export const PowerUp = SpriteKind.create()
export const mode = SpriteKind.create()
export const Display = SpriteKind.create()
export const Torpedo = SpriteKind.create()
export const PowerUp2 = SpriteKind.create()
export const earth = SpriteKind.create()
export const title = SpriteKind.create()
}
namespace StatusBarKind {
export const AstroidHealth = StatusBarKind.create()
export const L1EnemyHealth = StatusBarKind.create()
}
sprites.onOverlap(SpriteKind.Torpedo, SpriteKind.astroid, function (sprite, otherSprite) {
sprite.destroy()
info.changeScoreBy(100)
statusbars.getStatusBarAttachedTo(StatusBarKind.AstroidHealth, otherSprite).value += -100
scene.cameraShake(4, 500)
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.PowerUp2, function (sprite, otherSprite) {
otherSprite.destroy(effects.halo, 200)
torpedos += 3
torpedosDisplay.say("x" + torpedos)
})
function startPlay () {
effects.starField.startScreenEffect()
Ship = sprites.create(img`
. . . . . . . 1 . . . . . . . .
. . . . . . . 1 . . . . . . . .
. . . . . . 1 1 1 . . . . . . .
. . . . . . 1 1 1 . . . . . . .
. . . . . 1 1 1 1 1 . . . . . .
. . . . . 1 1 1 1 1 . . . . . .
. . . . 7 1 1 8 1 1 7 . . . . .
. . . . 1 1 8 9 8 1 1 . . . . .
. . . . 1 8 9 8 9 8 1 . . . . .
. . . 1 1 1 1 1 1 1 1 1 . . . .
. . . 1 1 1 1 f 1 1 1 1 . . . .
. . 1 1 f 1 1 f 1 1 f 1 1 . . .
1 1 1 1 f 1 1 f 1 1 f 1 1 1 1 .
. 1 1 1 2 1 1 f 1 1 2 1 1 1 . .
. . 1 1 4 1 1 2 1 1 4 1 1 . . .
. . . . . 1 1 4 1 1 . . . . . .
`, SpriteKind.Player)
earth = sprites.create(img`
..........................................................11111111111111111111111.........................................................
.....................................................111111111111111111111111111111111....................................................
.................................................11111111111111111111119111111111111111111................................................
..............................................81111111111111111111111111111911111111111111111.............................................
............................................888811111111119911111111111119991111111111111111111...........................................
.........................................888888881111111111199999111111111111111888881111111111888........................................
.......................................8886888988888888888811111199999111111118888888888888888888888......................................
.....................................88888866889989988888888111111111111111188888888888888888888888888....................................
...................................888888888866889999988888881111111111111888888888888888888888888888888..................................
.................................8888888888888866869999998888888888888888888888888888688888888888888888888................................
................................8888888888888888866689989988888888888888888888888888886888888888888886668899..............................
..............................8888881888888888888886666666699988818888888888888886666886666666666666689999888.............................
.............................888999811818888888888888866666688888888888888866666698811188899999999999988888888............................
...........................8888888899918166666688999999969999999988888886668899988118888888888888888888888888888..........................
..........................888888888888819188888666666666899999988888888688999888118888888811888888888888888888888.........................
.........................81188668888888811999981118888888888888888888888888111118888888111111111888888888888888887........................
........................8118111866668888881111888111188888877788888888888888888881111111111188888888888888888888777.......................
.......................888118881188866666666611117711111111881111111888888888788811111118888888888888888888888888777......................
......................88888111111111117777888111111111111111111181111111111111111118818888888888888888118888888117778.....................
.....................8877777777181181111118887787111111111111111111111111111111777771888886666666666611688888111117788....................
....................777777777777777117777787788777777777111111111111111777777777771188888888666666666166999188118777888...................
...................77777777777777777111177777777777777777777777777777777777777711177189999999999999999981111111887777888..................
..................8777777777717777777771111111777777777777777777771111111111111111118888888888888888888888888888877111888.................
.................887117777777777777777117177771111111117777777777771111111111777777778888888888888888188888888811111777788................
................87777711711177777777777711111777777777777777777117111111117777777777778888888888888118888888811118777777777...............
...............8777777771111111777777777777771111111111111111111117777777777777777777778888888881118811111111111118777777778..............
..............881177777777771111111111111111119911111111111111177777777777799977777777788888111111888888881111881888877777788.............
.............87777177777777777777711117777777777999999977777777799999999999777777777777881111111818888888888888888888888888888............
.............87771111111111111111111111171777777777777799999999977777777777777777777711111111888188888888888988888888888898888............
............8877777777777177777777777777777777777777777777777777777117777777771111111111177811118888888888898888888888899888888...........
...........888777777777777917777777777777777777777777777771777777771177777777777777777788111118888888188999888888888899888888888..........
...........888777777777777799777777777797777777777777777711777777717177177777779777771111111888888811999888888118889988888888888..........
..........88887777777777777779977777777799777777777777777177777711119999999911971111111118888888819998888888811899988888888888888.........
.........8888871777777777777711997777777779977777777777717797711177777777771777777777778777888811898888888889999888888889888888888........
.........8888887111777777777777119977777777799999999999199971117777777777117777777777778888811188888888899999988888888898118888888........
........888888887771117777777777771999777777777777711111711177777777771117777777777777788811888888888999998888888888111118888888888.......
........888811111111111111111111111111999111111111111111117777777777117777777777777777781188888888999998888888888111898888888888888.......
.......88888888887777771111111117777777719999111771111177777777777117777777777777777771188888889999888888888811118889888888888888888......
.......88899888811777777711111111111111177711999999977777777777711777777777777777777117888999998888888888111188888898888888889988888......
......8888889988881117777777777777777777777771111777999977777111779777777777777999999999998888888888111118888888889888888999998888888.....
......8888888899988771111777777777777777777717777777777799999999997777777777777711777788888888111111888888888888898999999999888888888.....
.....888888888811888711171111111111777777711717777777711177777777777777777777711777778888888881888888888888889999998888998888888888888....
.....888888999888118877711111111111111111111117777771177777777777777777777111177777999999999999999999999999998898889999888888888888888....
.....888888889999981187777777777777777711771111111117777777777777777777777777777777888888888888888888888888888999998888888888888888888....
....88888818888899988111111111111111177711111111777777777777777777777777777777777788888888888888888888888889998888888888888188111188888...
....88888881118888877777777777777777777777777777111777777777777777777777777777777788888888888888888888188999888888888888811111118888888...
...8888888888811188777777777777777777777777777777771111777777777777777777777777777888888888888888881119998988888888881111188818888888888..
...8888888888888811111111117777777777777777777777777777111111111111111111111777777888888888888881118998899888888811111188111188888888888..
...8888888888888877777777777777777777777777777777777777777777777777777777777778888888888881111118888888988888888811118111888888888888888..
..888888888888888777777777777777777777777777777777777777777777777777777777778888811111111188888888888888888881111111118888888888888888888.
`, SpriteKind.earth)
controller.moveSprite(Ship, 150, 150)
Ship.setFlag(SpriteFlag.StayInScreen, true)
earth.setPosition(79, 99)
earth.vy = 5
earth.z = -10
info.setLife(4)
info.setScore(0)
torpedos = 3
torpedosDisplay = sprites.create(img`
. d .
d d d
d b d
d b d
d b d
d b d
4 2 4
4 5 4
. 4 .
`, SpriteKind.Display)
torpedosDisplay.setFlag(SpriteFlag.Ghost, true)
torpedosDisplay.setPosition(10, 112)
torpedosDisplay.say("x" + torpedos)
L1EnemyCount = 0
waveCount = 20
level = 0
}
function L1EnemyDeath (enemy: Sprite) {
enemy.destroy(effects.fire, 200)
if (Math.percentChance(20)) {
powerUpDouble = sprites.create(img`
. 2 2 2 2 2 .
2 4 4 4 4 4 2
2 4 2 2 4 4 2
2 4 2 4 2 4 2
2 4 4 2 2 4 2
2 4 4 4 4 4 2
. 2 2 2 2 2 .
`, SpriteKind.PowerUp)
powerUpDouble.x = enemy.x
powerUpDouble.y = enemy.y
powerUpDouble.vy = 30
powerUpDouble.vx = randint(-30, 30)
}
if (Math.percentChance(20)) {
powerUpTorpedo = sprites.create(img`
. 8 8 8 8 8 .
8 6 6 6 6 6 8
8 6 6 8 8 6 8
8 6 8 6 8 6 8
8 6 8 8 6 6 8
8 6 6 6 6 6 8
. 8 8 8 8 8 .
`, SpriteKind.PowerUp2)
powerUpTorpedo.x = enemy.x
powerUpTorpedo.y = enemy.y
powerUpTorpedo.vy = 30
powerUpTorpedo.vx = randint(-30, 30)
}
}
sprites.onOverlap(SpriteKind.Player, SpriteKind.astroid, function (sprite, otherSprite) {
info.changeLifeBy(-1)
otherSprite.destroy(effects.fire, 200)
scene.cameraShake(4, 500)
})
controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
if (torpedos > 0) {
projectile2 = sprites.createProjectileFromSprite(img`
. d .
d d d
d b d
d b d
d b d
d b d
4 2 4
4 5 4
. 4 .
`, Ship, 0, -100)
projectile2.ay = -50
projectile2.startEffect(effects.fire, 500)
projectile2.setKind(SpriteKind.Torpedo)
torpedos += -1
torpedosDisplay.say("x" + torpedos)
}
})
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
projectile = sprites.createProjectileFromSprite(img`
. 5 .
5 4 5
. 5 .
. 5 .
. . .
. 4 .
. 5 .
. . .
. 5 .
`, Ship, 0, -200)
if (doublefire && doublefire.lifespan > 0) {
projectile = sprites.createProjectileFromSprite(img`
. 5 .
5 4 5
. 5 .
. 5 .
. . .
. 4 .
. 5 .
. . .
. 5 .
`, Ship, 0, -200)
projectile.x += 3
projectile.ay = -100
}
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.PowerUp, function (sprite, otherSprite) {
doublefire = sprites.create(img`
. 5 . . 5 .
5 4 5 5 4 5
. 5 . . 5 .
. 5 . . 5 .
. . . . . .
. 4 . . 4 .
. 5 . . 5 .
. . . . . .
. 5 . . 5 .
`, SpriteKind.mode)
doublefire.setPosition(4, 17)
otherSprite.destroy(effects.halo, 200)
doublefire.lifespan += 5000
})
function spawnAsteroid () {
astroid = sprites.create(img`
. . . . . . . . c c c c . . . .
. . . . c c c c c c c c c . . .
. . . c f c c a a a a c a c . .
. . c c f f f f a a a c a a c .
. . c c a f f c a a f f f a a c
. . c c a a a a b c f f f a a c
. c c c c a c c b a f c a a c c
c a f f c c c a b b 6 b b b c c
c a f f f f c c c 6 b b b a a c
c a a c f f c a 6 6 b b b a a c
c c b a a a a b 6 b b a b b a .
. c c b b b b b b b a c c b a .
. . c c c b c c c b a a b c . .
. . . . c b a c c b b b c . . .
. . . . c b b a a 6 b c . . . .
. . . . . . b 6 6 c c . . . . .
`, SpriteKind.astroid)
anim = 0
astroid.x = randint(10, scene.screenWidth() - 10)
astroid.y = 0
astroid.vy = 10
animation.runImageAnimation(
astroid,
[img`
. . . . . . . c c c a c . . . .
. . c c b b b a c a a a c . . .
. c c a b a c b a a a b c c . .
. c a b c f f f b a b b b a . .
. c a c f f f 8 a b b b b b a .
. c a 8 f f 8 c a b b b b b a .
c c c a c c c c a b c f a b c c
c c a a a c c c a c f f c b b a
c c a b 6 a c c a f f c c b b a
c a b c 8 6 c c a a a b b c b c
c a c f f a c c a f a c c c b .
c a 8 f c c b a f f c b c c c .
. c b c c c c b f c a b b a c .
. . a b b b b b b b b b b b c .
. . . c c c c b b b b b c c . .
. . . . . . . . c b b c . . . .
`,img`
. . . . . . . . c c c c . . . .
. . . . c c c c c c c c c . . .
. . . c f c c a a a a c a c . .
. . c c f f f f a a a c a a c .
. . c c a f f c a a f f f a a c
. . c c a a a a b c f f f a a c
. c c c c a c c b a f c a a c c
c a f f c c c a b b 6 b b b c c
c a f f f f c c c 6 b b b a a c
c a a c f f c a 6 6 b b b a a c
c c b a a a a b 6 b b a b b a .
. c c b b b b b b b a c c b a .
. . c c c b c c c b a a b c . .
. . . . c b a c c b b b c . . .
. . . . c b b a a 6 b c . . . .
. . . . . . b 6 6 c c . . . . .
`,img`
. . . . . . . . . c c 8 . . . .
. . . . . . 8 c c c f 8 c c . .
. . . c c 8 8 f c a f f f c c .
. . c c c f f f c a a f f c c c
8 c c c f f f f c c a a c 8 c c
c c c b f f f 8 a c c a a a c c
c a a b b 8 a b c c c c c c c c
a f c a a b b a c c c c c f f c
a 8 f c a a c c a c a c f f f c
c a 8 a a c c c c a a f f f 8 a
. a c a a c f f a a b 8 f f c a
. . c c b a f f f a b b c c 6 c
. . . c b b a f f 6 6 a b 6 c .
. . . c c b b b 6 6 a c c c c .
. . . . c c a b b c c c . . . .
. . . . . c c c c c c . . . . .
`],
500,
true
)
AstroidStatusBar = statusbars.create(0, 0, StatusBarKind.AstroidHealth)
AstroidStatusBar.attachToSprite(astroid)
}
statusbars.onZero(StatusBarKind.AstroidHealth, function (status) {
L1EnemyDeath(status.spriteAttachedTo())
})
sprites.onOverlap(SpriteKind.Torpedo, SpriteKind.Enemy, function (sprite, otherSprite) {
sprite.destroy()
info.changeScoreBy(100)
statusbars.getStatusBarAttachedTo(StatusBarKind.L1EnemyHealth, otherSprite).value += -100
})
function spawnL1Enemy () {
baddies1 = sprites.create(img`
. . . . . . 4 . . . 4 . . . . .
. . . . 7 2 4 2 7 2 4 2 7 . . .
. . . 7 7 7 7 7 7 7 7 7 7 7 . .
. . 7 7 7 7 8 7 7 7 8 7 7 7 7 .
. . 7 7 7 7 7 7 7 7 7 7 7 7 7 .
. . . 7 7 7 8 7 7 7 8 7 7 7 . .
. . . . 7 7 7 7 7 7 7 7 7 . . .
. . . . 7 7 8 7 7 7 8 7 7 . . .
. . . . 7 . 8 9 8 9 8 . 7 . . .
. . . . 2 . 7 8 9 8 7 . 2 . . .
. . . . . . 7 7 8 7 7 . . . . .
. . . . . . . 7 7 7 . . . . . .
. . . . . . . 7 7 7 . . . . . .
. . . . . . . 7 5 7 . . . . . .
. . . . . . . 7 5 7 . . . . . .
. . . . . . . . 7 . . . . . . .
`, SpriteKind.Enemy)
baddies1.x = randint(10, scene.screenWidth() - 10)
baddies1.y = 0
baddies1.vy = 30
L1EnemeyStatus = statusbars.create(12, 2, StatusBarKind.L1EnemyHealth)
L1EnemeyStatus.attachToSprite(baddies1)
L1EnemyCount += 1
}
sprites.onOverlap(SpriteKind.Projectile, SpriteKind.astroid, function (sprite, otherSprite) {
sprite.destroy()
statusbars.getStatusBarAttachedTo(StatusBarKind.AstroidHealth, otherSprite).value += -5
})
sprites.onOverlap(SpriteKind.Projectile, SpriteKind.Enemy, function (sprite, otherSprite) {
sprite.destroy()
info.changeScoreBy(100)
statusbars.getStatusBarAttachedTo(StatusBarKind.L1EnemyHealth, otherSprite).value += -20
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
info.changeLifeBy(-1)
scene.cameraShake(4, 500)
L1EnemyDeath(otherSprite)
})
statusbars.onZero(StatusBarKind.L1EnemyHealth, function (status) {
L1EnemyDeath(status.spriteAttachedTo())
})
let L1EnemeyStatus: StatusBarSprite = null
let baddies1: Sprite = null
let AstroidStatusBar: StatusBarSprite = null
let anim = 0
let astroid: Sprite = null
let doublefire: Sprite = null
let projectile: Sprite = null
let projectile2: Sprite = null
let powerUpTorpedo: Sprite = null
let powerUpDouble: Sprite = null
let level = 0
let waveCount = 0
let L1EnemyCount = 0
let earth: Sprite = null
let Ship: Sprite = null
let torpedosDisplay: Sprite = null
let torpedos = 0
let title: Sprite = null
story.startConveration(function () {
story.printDialog("The year is 20X9.", 80, 70, 50, 150, 1, 15, story.TextSpeed.Normal)
pause(2500)
story.printDialog("An alien species--the Vocids--is enroute to destroy Earth", 80, 70, 50, 150, 1, 15, story.TextSpeed.Normal)
pause(5500)
story.printDialog("Humanity has established a new home on the moon of Saturn.", 80, 70, 50, 150, 1, 15, story.TextSpeed.Normal)
pause(5500)
story.printDialog("You are the final ship to evacuate. You must...", 80, 70, 50, 150, 1, 15, story.TextSpeed.Normal)
title = sprites.create(img`
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
......................................................................111.......................................................................................
....................................................................11..........................................................................................
.................................................11111111111.....111............................................................................................
.................................................1.1.......11...11..............................................................................................
................11.......1....11111........11......1........1....1......1.......11..............................................................................
...........11111......111.....1...........1.11.....1........1....1....111.......1...............................................................................
........111........111.......11...........1..1......1.....11.....1..11........11................................................................................
.........1........1..........1............1..11......1.111.......1.1........11..................................................................................
.........1.......1...........11..........1.111.1.....1...........1.......111....................................................................................
.........1.1111..1111111111111.111111111111.....1....11...........1.....1.......................................................................................
.........1...................1...........1......11....1...........1...11........................................................................................
..........1..............1111............1.......1....1............111..........................................................................................
..........1..........1111..........................................1............................................................................................
..........1.......111...............................................1...........................................................................................
..........1...1111..............................................................................................................................................
..........1111..................................................................................................................................................
..........1.....................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
......................................................1.........................................................................................................
..........................................111111111111.....11...................................................................................................
..............................................1...........1..11.................................................................................................
...............................................1..........1...1.................................................................................................
...............................................1..........1..11.............................................44444...............................................
................................................1..........11...............................................44444...............................................
................................................1...........................................................444444..............................................
.................................444444..........11.........................................................444444..............................................
...............................44444444.....................................................................444444..............................................
............................44444444444.....................................................................444444..............................................
..........................4444444444444..............................................44444...................444444.............................................
........................444444444444444..............................................444444..................444444.............................................
.....................444444444444444444..............................................4444444.................4444444............................................
..................44444444444444444..................................................44444444................4444444............................................
................444444444444444455...................................................444444444................444445............................................
..............4444444444444445555.......................................4444444......444444444................4444454...........................................
...........444444444444444555......................................444444444444.......444444444................444454...........................................
.........44444444444444455....44444.............................444444444444444.......4444444444...............444445...........................................
........44444444444444.5......44444..........................444444444444444445........444444444...............444445...........................................
.......4444444444444..5.......44444........................44444444444444455555........4444444444...............44445...........................................
.....44444444444444...........44444......................4444444444444455544............4444444444..............44445...........................................
.....44444444444444...........44444...................44444444444445555.................44444444444.............444445..........................................
.....44444444.44445.................................4444444444444554.....................444444444444...........444445..........................................
.....4444444..44445..............................4444444444444555........................4444444444444..........444445..........................................
.....444444...44445...........................44444444444455554.............4444444.......4444444444444.........4444445.........................................
..............44445.............44444.......44444444444444444...............44444444......44444444444444.........444445.........................................
..............444445............444444......44444444444444..................444444444.....444444444444444........444445.........................................
..............444445............444444......4444444444444...................4444444444.....444444444444444.......444445.........................................
..............444445............444445......4444444444444...................4444444444.....444444.444444444......444445.........................................
..............444445............444445......444444..444444..................44444444454....444444..554444444.....4444445........................................
..............444445.............444454.............444444..................44444444454....4444444..544444444....4444445........................................
..............444445.............444445.............444444..................44444444454.....444444...544444444....444445........................................
..............444445.............444445.............44444445................444444444454....4444444...544444444...444445........................................
...............44445.............4444445.............44444445...............44444.444454....4444444....544444444...444445.......................................
...............44445..............444445.............44444445...............44445.4444454....444444.....544444444..444445.......................................
...............44445..............444445.............44444445...............44445.44444544...4444444.....554444444.4444445......................................
...............444454.............444445..............4444445...............44445..4444454....444444......4544444444444445......................................
...............444454..............444445..............4444445..............44445..44444544...4444444......454444444444445......................................
...............444454..............44444.5.............4444445..............44445...4444454...4444444.......45444444444445......................................
...............444454..............4444445.............44444445.............44445...44444454...4444444.......4544444444445......................................
................44454..............444444.5.............4444445.............4444544444444454...4444444........455444444445......................................
................44454..............444444.5.............44444445............44445444444444454...444444.........45444444445......................................
................444544.............444444..5.............4444445............44445444444444454...444444..........4544444445......................................
................444544..............444444..5............4444445............44444444444444445....44444...........455544445......................................
................444544..............444444..5.............444445............444444444444444445...44444............4454444.5.....................................
................4445444.............444444..5.............4444454...........444444444...4444445..44444.............444444.5.....................................
.................445444.............4444444..5.............444445...........4444444.....44444455.44444..............44444.5.....................................
.................444544..............444444..5.............4444454..........44444.......444444.5................................................................
.................4445444.............444444...5............4444454..........44444.......444444..................................................................
..................445444.............4444444...5............444444..........44444...............................................................................
..................444544..............4444444...5...........444444..........44444...............................................................................
..................4445444.............4444444...5............44444..........44444...............................................................................
...................444544.............4444444....5...........44444..........44444...............................................................................
...................444544..............444444.....5..........44444..........44444...............................................................................
...................4445544..............44444.....5.............................................................................................................
....................444544..............44444...................................................................................................................
....................444554..............44444...................................................................................................................
....................444454......................................................................................................................................
.....................44444......................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
`, SpriteKind.title)
})
game.onUpdateInterval(randint(4000, 6000), function () {
if (level >= 1) {
if (L1EnemyCount <= waveCount) {
spawnAsteroid()
}
}
})
game.onUpdateInterval(randint(500, 2000), function () {
if (level >= 1) {
if (L1EnemyCount <= waveCount) {
spawnL1Enemy()
}
}
})