org.deken.game.map
Class MapElement

java.lang.Object
  extended by org.deken.game.map.MapElement
Direct Known Subclasses:
SectionElement

public class MapElement
extends java.lang.Object


Constructor Summary
MapElement(Decor decor, boolean placeHolder, boolean nonCollision, int xTile, int yTile, int layerTile)
           
MapElement(Decor decor, int xTile, int yTile, int layerTile)
           
 
Method Summary
 Decor getDecor()
          Returns the Decor at this location.
 int getLayerTile()
           
 int getxTile()
           
 int getyTile()
           
 boolean isNonCollision()
           
 boolean isPlaceHolder()
          The place holder is used for collision detection.
 void setDecor(Decor decor)
          Sets the decor for this location.
 void setNonCollision(boolean nonCollision)
          Sets if this Decor can be collided with or passed through.
 void setPlaceHolder(boolean placeHolder)
          PlaceHolder is a flag for an adjacent tile, where the Decor is larger then a single cell.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapElement

public MapElement(Decor decor,
                  int xTile,
                  int yTile,
                  int layerTile)

MapElement

public MapElement(Decor decor,
                  boolean placeHolder,
                  boolean nonCollision,
                  int xTile,
                  int yTile,
                  int layerTile)
Parameters:
decor -
placeHolder -
nonCollision -
Method Detail

getDecor

public Decor getDecor()
Returns the Decor at this location.

Returns:
decor

getLayerTile

public int getLayerTile()

getxTile

public int getxTile()

getyTile

public int getyTile()

isPlaceHolder

public boolean isPlaceHolder()
The place holder is used for collision detection. The element is not rendered to the screen.

Returns:
if placeholder.

isNonCollision

public boolean isNonCollision()

setDecor

public void setDecor(Decor decor)
Sets the decor for this location.

Parameters:
decor -

setNonCollision

public void setNonCollision(boolean nonCollision)
Sets if this Decor can be collided with or passed through.

Parameters:
nonCollision -

setPlaceHolder

public void setPlaceHolder(boolean placeHolder)
PlaceHolder is a flag for an adjacent tile, where the Decor is larger then a single cell. PlaceHolders usually do not have a Decor in them.

Parameters:
placeHolder -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object