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 ITileLayerConstructor Summary
Method Summary
Modifier and Type Method Description protected java.util.List<Tile>getData()intgetHeight()Gets the height.protected TileDatagetRawTileData()ITilegetTile(int x, int y)Gets the tile at the specified map grid location.ITilegetTileByLocation(java.awt.geom.Point2D location)Gets the tile by location.java.util.List<ITile>getTiles()Gets the tiles.intgetWidth()Gets the width.voidsetTile(int x, int y, int gid)Sets the id of the tile at the specified map grid location.voidsetTile(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, setWidthMethods 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, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, setValueMethods 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:ITileLayerGets the tile by location.- Specified by:
getTileByLocationin interfaceITileLayer- Parameters:
location- the location- Returns:
- the tile by location
getTile
Description copied from interface:ITileLayerGets 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:
getTilein 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:ITileLayerSets the id of the tile at the specified map grid location.- Specified by:
setTilein 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:ITileLayerSets the id of the tile at the specified map grid location.- Specified by:
setTilein 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:ITileLayerGets the tiles.- Specified by:
getTilesin interfaceITileLayer- Returns:
- the tiles
getWidth
public int getWidth()Description copied from class:LayerGets the width.getHeight
public int getHeight()Description copied from class:LayerGets the height.getData
getRawTileData
