- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorldBlock.java
More file actions
Latest commit
33 lines (30 loc) · 838 Bytes
/
Copy pathWorldBlock.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
importgreenfoot.*;
/**
* The WorldBlock class to make solid blocks in the GameWorld.
*
* @author Matthew Hillier
* @version 1.0
*/
publicclassWorldBlockextendsTiles
{
privateStringblockName; //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.
*/
publicWorldBlock(StringinBlockName, inttileSetNum, intinWorldX, intinWorldY)
{
super(inBlockName, 46, 0, tileSetNum, inWorldX, inWorldY);
blockName = inBlockName;
}
/**
* Returns the name of the block.
*/
publicStringgetBlockName()
{
returnblockName;
}
}