Class TileLayer
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.Layer
de.gurkenlabs.litiengine.environment.tilemap.xml.TileLayer
- All Implemented Interfaces:
ICustomPropertyProvider
,ILayer
,ITileLayer
public class TileLayer
extends Layer
implements ITileLayer
Constructor Summary
Method Summary
Modifier and Type Method Description protected java.util.List<Tile>
getData()
int
getHeight()
Gets the height.protected TileData
getRawTileData()
ITile
getTile(int x, int y)
Gets the tile at the specified map grid location.ITile
getTileByLocation(java.awt.geom.Point2D location)
Gets the tile by location.java.util.List<ITile>
getTiles()
Gets the tiles.int
getWidth()
Gets the width.void
setTile(int x, int y, int gid)
Sets the id of the tile at the specified map grid location.void
setTile(int x, int y, ITile tile)
Sets the id of the tile at the specified map grid location.Methods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.Layer
afterUnmarshal, getId, getMap, getName, getOffset, getOffsetX, getOffsetY, getOpacity, getRenderType, getSizeInTiles, isVisible, setHeight, setMap, setName, setOpacity, setRenderType, setVisible, setWidth
Methods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.ICustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
Methods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.ILayer
getId, getMap, getName, getOffset, getOffsetX, getOffsetY, getOpacity, getRenderType, getSizeInTiles, isVisible, setHeight, setName, setOpacity, setRenderType, setVisible, setWidth
Constructor Details
Method Details
getTileByLocation
Description copied from interface:ITileLayer
Gets the tile by location.- Specified by:
getTileByLocation
in interfaceITileLayer
- Parameters:
location
- the location- Returns:
- the tile by location
getTile
Description copied from interface:ITileLayer
Gets the tile at the specified map grid location.To retrieve map grid coordinates from a location on the map, use the
MapUtilities#getTile(Point2D)
method.- Specified by:
getTile
in interfaceITileLayer
- Parameters:
x
- The x-coordinate (on the map grid) to retrieve the tile.y
- The y-coordinate (on the map grid) to retrieve the tile.- Returns:
- The tile at the specified grid location.
- See Also:
MapUtilities.getTile(Point2D)
setTile
Description copied from interface:ITileLayer
Sets the id of the tile at the specified map grid location.- Specified by:
setTile
in interfaceITileLayer
- Parameters:
x
- The x-coordinate (on the map grid).y
- The y-coordinate (on the map grid).tile
- The tile that provides the tile id to be set on the tile at the specified location.- See Also:
ITile.getGridId()
setTile
public void setTile(int x, int y, int gid)Description copied from interface:ITileLayer
Sets the id of the tile at the specified map grid location.- Specified by:
setTile
in interfaceITileLayer
- Parameters:
x
- The x-coordinate (on the map grid).y
- The y-coordinate (on the map grid).gid
- The id to be set on the tile at the specified location.
getTiles
Description copied from interface:ITileLayer
Gets the tiles.- Specified by:
getTiles
in interfaceITileLayer
- Returns:
- the tiles
getWidth
public int getWidth()Description copied from class:Layer
Gets the width.getHeight
public int getHeight()Description copied from class:Layer
Gets the height.getData
getRawTileData