map
Class Tile
java.lang.Object
map.Tile
public class Tile
- extends java.lang.Object
- Author:
- Shannon Smith
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Tile
public Tile(GameMap map,
int x,
int y,
Tile.TileType type)
getType
public Tile.TileType getType()
getCenter
public Vector3f getCenter()
setType
public void setType(Tile.TileType type)
getX
public int getX()
getY
public int getY()
addFeature
public void addFeature(Feature feature)
lock
public void lock()
unlock
public void unlock()
isLocked
public boolean isLocked()
getCornerHeight
public float getCornerHeight(GameMath.MapDir dir)
getHeightAt
public float getHeightAt(float x,
float y)
- Parameters:
x - float between 0 and 1y - float between 0 and 1
- Returns:
getNeighbour
public Tile getNeighbour(GameMap map,
GameMath.MapDir dir)
fade
public float fade(float n)
unitCanEnter
public boolean unitCanEnter()
getRoamTriLeft
public MapTri getRoamTriLeft()
getRoamTriRight
public MapTri getRoamTriRight()
generateMesh
public void generateMesh(MapVertex v1,
MapVertex v2,
MapVertex v3,
MapVertex v4)
splitMesh
public void splitMesh(GameMap map)
linkMesh
public void linkMesh(GameMap map)
draw
public void draw()
hasFeatures
public boolean hasFeatures()
drawFeatures
public void drawFeatures()
distanceTo
public int distanceTo(Tile tile)
- Manhattan distance.
- Parameters:
tile -
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object