-
Notifications
You must be signed in to change notification settings - Fork 0
/
Level3.java
65 lines (56 loc) · 1.7 KB
/
Level3.java
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
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Level3 here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Level3 extends Levels
{
/**
* Constructor for objects of class Level3.
*
*/
static GreenfootSound level3Sound = new GreenfootSound("level3.wav");
static Counter life2 = new Counter ("Mayadenawa Life : ");
public Level3()
{
if(Levels.level == 1 || Levels.level == 2);
{
Levels.win = 2;
}
level3Sound.playLoop();
prepare();
}
/**
* Prepare the world for the start of the program.
* That is: create the initial objects and add them to the world.
*/
private void prepare()
{
Indra indra = new Indra();
addObject(indra,67,513);
indra.setLocation(62,519);
Level1.score.setValue(Level1.score.getValue());
addObject(Level1.score,50,18);
//Level1.life.setValue(Level1.life.getValue());
//untuk development
if(Level1.life.getValue() == 0)
{
Level1.life.setValue(5);
}
addObject(Level1.life,160,18);
FinalMayadenawa finalMayadenawa = new FinalMayadenawa();
addObject(finalMayadenawa,678,470);
//Counter life2 = new Counter("Mayadenawa Life : ");
life2.setValue(25);
addObject(life2,680,19);
//life2.setLocation(680,19);
//life2.setValue(25);
ApiChimera apiChimera = new ApiChimera();
addObject(apiChimera,97,18);
HujanApi hujanApi = new HujanApi();
addObject(hujanApi,211,22);
removeObject(apiChimera);
}
}