- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLevelTwo.java
More file actions
Latest commit
75 lines (61 loc) · 2.07 KB
/
Copy pathLevelTwo.java
File metadata and controls
75 lines (61 loc) · 2.07 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
importgreenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class LevelTwo here.
*
* @author (your name)
* @version (a version number or a date)
*/
publicclassLevelTwoextendsPlanet
{
privatePlayerEntityplayer;
privateStatuestatueOne, statueTwo, statueThree;
privateAlienEntityprimus, secundus, tertius, quartus, quintus;
privateDoorEntitydoor;
publicLevelTwo()
{
super(700, 500, 1500);
player = newPlayerEntity();
addObject(player, 280, 412);
statueOne = newStatue();
addObject(statueOne, 40, -146);
statueTwo = newStatue();
addObject(statueTwo, 1400, 422);
statueThree = newStatue();
addObject(statueThree, 900, - 266);
door = newDoorEntity();
addObject(door, 60, 405);
primus = AlienEntity.createPrimus();
addObject(primus, 550, 400);
secundus = AlienEntity.createSecundus();
addObject(secundus, 1000, 230);
tertius = AlienEntity.createTertius();
addObject(tertius, 250, -100);
quartus = AlienEntity.createQuartus();
addObject(quartus, 720, -200);
quintus = AlienEntity.createQuintus();
addObject(quintus, 1100, -400);
addPlatforms();
}
publicvoidvictory()
{
showText("You Win!", 350, 200);
showText("The Planet Has Been Explored", 350, 320);
Greenfoot.stop();
}
publicvoidaddPlatforms()
{
createPlatform(16, 0, 50);
createPlatform(6, 690, 400);
createPlatform(3, 850, 290);
createPlatform(3, 930, 150);
createPlatform(8, 1070, 280);
createPlatform(2, 1200, 140);
createPlatform(1, 930, 150);
createPlatform(3, 1300, 70);
createPlatform(4, 1320, -40);
createPlatform(8, 1100, -140);
createPlatform(5, 860, -210);
createPlatform(4, 650, -60);
createPlatform(4, 0, -90);
}
}