-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLevelFour7584286776790032229.autosave
75 lines (61 loc) · 2.48 KB
/
LevelFour7584286776790032229.autosave
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
class LevelFour extends Level {
//String[] textScene = new String[3];
boolean bossDead;
LevelFour() {
super();
showHUD = false;
allowItems = true;
dropItems = false;
}
void setupLevel() {
emus.add(new BossEmu(random(width*.75, width), random(300, height-300), 0.8));
guns.add(new Gun_Minigun(5000));
for (Gun g : guns) {
g.setAmmo(g.getMaxAmmo());
}
allowItems = true;
gunWorking = true;
for (int i = 0; i < 30; i++) {
decorations.add(new Decor(int(random(0, width)), int(random(0, height)), random(0.2, 0.4), false, bushImages));
}
truck.setX(0);
truck.setY(height/2);
truck.setHeading(PI*0.5);
truck.setSpeed(0);
truck.setHP(1);
truck.resetMaxSpeed();
inventory.put("Boomerang", 2);
inventory.put("Vegemite", 5);
inventory.put("Grenade", 2);
inventory.put("Landmine", 3);
inventory.put("Gas", 1);
textScene[0] = "November 6, 1932 \n \n \nMajor G.P.W Meredith,\n \nWe are receiving negative press about this operation, due to each of our attempts being failures.\nAt this rate, we will not be able to fund this offensive much longer.\n\nHowever, I have got some new info about the enemy, one of the army observers noted that each pack seems to now have its own\nleader, a big, black-plumed bird which stands fully six feet high.\n\nTake your men out again, find this big one, and kill him.\nThis one will probably fight back, so we're going to send you out with some supplies.\n\nGood luck,\nPrime Minister Lyons";
endScene[0] = "Operation Update - November 4, 1932 \n \n \nWe waited until the emus arrived, then opened fire. \nUnfortunately, after killing only about a dozen of them, our gun jammed.\nThis gave them the opportunity to run away.\nWe were able to run a few down and hit them with our truck, but the majority escaped.\n\n - Major G.P.W Meredith";
typewriter.loop(5);
bossDead = false;
}
void update() {
super.update();
if (scene == 1 && !levelEnded) {
hud.showItems();
if (bossDead) {
track = true;
if (frameCount%2 == 0) {
emus.add(new StaticEmu(random(width, width*1.1), random(0, height), random(0.1, 0.4)));
}
}
if (emusAlive() == 0) {
bossDead = true;
}
if (endTimerState) {
endTimer++;
rectMode(CENTER);
fill(0, endTimer/2);
rect(width/2, height/2, width, height);
}
if (endTimer > 600) {
levelEnded = true;
}
}
}
}