|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmhframework.tilemap.MHTileSetManager
public class MHTileSetManager
This class manages the complete collection of all the tilesets in a game. The tiles are organized in three separate groups: floor tiles, static wall tiles, and interactive tiles.
Note: This class stores tile images only. These are NOT the actor objects represented by the images.
How to create tiles for a tileset:
To initialize an MHTileSetManager object, simply call the loadTileSet() method with a tile set number, or use the constructor that takes the tile set number parameter.
Field Summary | |
---|---|
static int |
MAX_TILE_SETS
Maximum number of supported tile sets. |
static int |
NULL_TILE_ID
Placeholder indicating that tile should be null. |
static java.lang.String |
TILE_SET_DIRECTORY
|
Constructor Summary | |
---|---|
MHTileSetManager()
Constructor. |
|
MHTileSetManager(int tileSetNumber)
Constructor. |
Method Summary | |
---|---|
int |
getCurrentTileSetID()
Returns the identifier of this tileset. |
java.awt.Image |
getTileImage(int layer,
int tileNum,
int animFrame)
Returns the requested tile image. |
MHImageGroup |
getTileImageGroup(int layer)
Returns the image group for a layer of tiles. |
void |
loadTileSet(int tileSetNumber)
Loads the tile set specified by the given tile set number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NULL_TILE_ID
public static final int MAX_TILE_SETS
public static final java.lang.String TILE_SET_DIRECTORY
Constructor Detail |
---|
public MHTileSetManager()
public MHTileSetManager(int tileSetNumber)
Method Detail |
---|
public void loadTileSet(int tileSetNumber)
tileSetNumber
- The number of the tile set to be loaded.public int getCurrentTileSetID()
public java.awt.Image getTileImage(int layer, int tileNum, int animFrame)
public MHImageGroup getTileImageGroup(int layer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |