-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorldBlock.java
More file actions
33 lines (30 loc) · 838 Bytes
/
WorldBlock.java
File metadata and controls
33 lines (30 loc) · 838 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
import greenfoot.*;
/**
* The WorldBlock class to make solid blocks in the GameWorld.
*
* @author Matthew Hillier
* @version 1.0
*/
public class WorldBlock extends Tiles
{
private String blockName; //The name of the block
/**
* Creates a new WorldBlock.
* @param inBlockName The name of the block.
* @param tileSetNum The tileSet id.
* @param inWorldX The X coordinate in the world.
* @param inWorldY The Y coordinate in the world.
*/
public WorldBlock(String inBlockName, int tileSetNum, int inWorldX, int inWorldY)
{
super(inBlockName, 46, 0, tileSetNum, inWorldX, inWorldY);
blockName = inBlockName;
}
/**
* Returns the name of the block.
*/
public String getBlockName()
{
return blockName;
}
}