-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDoorBlock.java
More file actions
34 lines (31 loc) · 842 Bytes
/
DoorBlock.java
File metadata and controls
34 lines (31 loc) · 842 Bytes
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
import greenfoot.*;
/**
* The DoorBlock class, to make doors in the overworld.
*
* @author Matthew Hillier
* @version 1.0
*/
public class DoorBlock extends Tiles
{
private String coords; //The coordinates of the Door.
/**
* Creates a new Door.
* @param id The door's ID.
* @param imageX The image's X coordinate.
* @param imageY The image's Y coordinate.
* @param inWorldX The X coordinate in the world.
* @param inWorldY The Y coordinate in the world.
*/
public DoorBlock(String id, int imageX, int imageY, int inWorldX, int inWorldY)
{
super("Door", imageX, imageY, 1, inWorldX, inWorldY);
coords = id;
}
/**
* Returns the door's coordinates.
*/
public String getCoords()
{
return coords;
}
}