mhframework.tilemap
Class MHStaggeredMap
java.lang.Object
mhframework.tilemap.MHTileMap
mhframework.tilemap.MHIsometricMap
mhframework.tilemap.MHStaggeredMap
- All Implemented Interfaces:
- MHRenderable
public class MHStaggeredMap
- extends MHIsometricMap
Handles the presentation of a staggered (layered) isometric map.
Fields inherited from class mhframework.tilemap.MHTileMap |
anchorSpace, cursorAddress, cursorAnchor, cursorPoint, DIR_EAST, DIR_NORTH, DIR_NORTHEAST, DIR_NORTHWEST, DIR_SOUTH, DIR_SOUTHEAST, DIR_SOUTHWEST, DIR_WEST, MAX_DIRECTIONS, screenAnchor, screenSpace, worldSpace |
Method Summary |
protected void |
calculateAnchorSpace()
Calculate the anchor space for this tile map. |
java.awt.Point |
plotTile(int mapRow,
int mapCol)
Plots the upper-left anchor point of a base tile image. |
protected MHMapCellAddress |
tileWalk(int row,
int column,
int direction)
Calculates the next map position to which an actor would walk
if it were in position (row, column) and
travelled in the direction specified by direction. |
Methods inherited from class mhframework.tilemap.MHTileMap |
calculateWorldSpace, clipCursorAddress, clipScreenAnchor, getCursorAddress, getCursorPoint, getMapData, getScreenAnchor, getScreenSpace, getTileWidth, isAnchorCoordinate, isScreenCoordinate, isWorldCoordinate, mouseMoved, screenToWorld, scrollMap, setCursorPoint, setScreenAnchor, setScreenAnchor, setScreenSpace, setTileWidth, worldToScreen |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MHStaggeredMap
public MHStaggeredMap(java.lang.String filename,
MHObjectFactory vendor)
MHStaggeredMap
public MHStaggeredMap(java.lang.String filename,
MHObjectFactory vendor,
boolean flatEdges)
tileWalk
protected MHMapCellAddress tileWalk(int row,
int column,
int direction)
- Description copied from class:
MHIsometricMap
- Calculates the next map position to which an actor would walk
if it were in position (row, column) and
travelled in the direction specified by direction.
- Specified by:
tileWalk
in class MHIsometricMap
- Parameters:
row
- The actor's current row position.column
- The actor's current column position.direction
- The direction in which to walk.
- Returns:
- A point indicating the actor's new column and row
position after walking from its original position.
plotTile
public java.awt.Point plotTile(int mapRow,
int mapCol)
- Plots the upper-left anchor point of a base tile image.
- Specified by:
plotTile
in class MHIsometricMap
- Parameters:
mapRow
- The row of the map containing the actor (tile) to be
plotted.mapCol
- The column of the map containing the actor (tile) to
be plotted.
- Returns:
- The pixel position at which the actor will be rendered.
calculateAnchorSpace
protected void calculateAnchorSpace()
- Description copied from class:
MHTileMap
- Calculate the anchor space for this tile map.
- Overrides:
calculateAnchorSpace
in class MHTileMap