mhframework.tilemap
Class MHMapCell

java.lang.Object
  extended by mhframework.tilemap.MHMapCell
All Implemented Interfaces:
MHRenderable

public class MHMapCell
extends java.lang.Object
implements MHRenderable

A single cell in the map grid (MHMap).


Field Summary
static int CEILING_LAYER
           
static int DETAIL_LAYER
           
static int FLOOR_LAYER
           
static int ITEM_LAYER
           
static int NUM_LAYERS
           
static int WALL_LAYER
           
 
Constructor Summary
MHMapCell()
          Constructor.
 
Method Summary
 void advance()
          Tells an object to update its data.
 int getBaseHeight()
           
 int getBaseWidth()
           
 MHActor getLayer(int layer)
           
 void render(java.awt.Graphics2D g)
          Tells an object to draw itself onto the sent Graphics object.
 void render(java.awt.Graphics2D g, int layer, int x, int y)
           
 void setLayer(int layer, MHActor actor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLOOR_LAYER

public static final int FLOOR_LAYER
See Also:
Constant Field Values

ITEM_LAYER

public static final int ITEM_LAYER
See Also:
Constant Field Values

WALL_LAYER

public static final int WALL_LAYER
See Also:
Constant Field Values

DETAIL_LAYER

public static final int DETAIL_LAYER
See Also:
Constant Field Values

CEILING_LAYER

public static final int CEILING_LAYER
See Also:
Constant Field Values

NUM_LAYERS

public static final int NUM_LAYERS
See Also:
Constant Field Values
Constructor Detail

MHMapCell

public MHMapCell()
Constructor.

Method Detail

setLayer

public void setLayer(int layer,
                     MHActor actor)

getLayer

public MHActor getLayer(int layer)

advance

public void advance()
Description copied from interface: MHRenderable
Tells an object to update its data.

Specified by:
advance in interface MHRenderable

render

public void render(java.awt.Graphics2D g)
Description copied from interface: MHRenderable
Tells an object to draw itself onto the sent Graphics object.

Specified by:
render in interface MHRenderable
Parameters:
g - The Graphics object on which this object is to draw itself.

render

public void render(java.awt.Graphics2D g,
                   int layer,
                   int x,
                   int y)

getBaseHeight

public int getBaseHeight()

getBaseWidth

public int getBaseWidth()