-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBunker
46 lines (30 loc) · 797 Bytes
/
Bunker
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
package grid;
import org.newdawn.slick.geom.Vector2f;
import playerObjects.Icon;
public class Bunker {
//Hitpoints before game over
private int hp;
//Location on grid
private Vector2f loc;
private Icon image;
//On-grid identifier
private int id;
public Bunker(int hitpoints, Vector2f loc, Icon i) {
hp = hitpoints; //This is the hp of the bunker, setting the hits before the player loses.
this.loc = loc; //This is the location relative to the grid
image = i; //This is the bunker image that is displayed
id = 100; //This is to render it on the grid and recognize where it is
}
public int getHp() {
return hp;
}
public Vector2f getLoc() {
return loc;
}
public int getId() {
return id;
}
public Icon getDesign() {
return image;
}
}