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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData()intGets the height.protected TileDatagetTile(int x, int y) Gets the tile at the specified map grid location.getTileByLocation(Point2D location) Gets the tile by location.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.voidSets the id of the tile at the specified map grid location.Methods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.Layer
afterUnmarshal, getHorizontalParallaxFactor, getId, getMap, getName, getOffset, getOffsetX, getOffsetY, getOpacity, getRenderType, getSizeInTiles, getTintColor, getVerticalParallaxFactor, isVisible, setHeight, setMap, setName, setOpacity, setRenderType, setTintColor, setVisible, setWidthMethods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getCharValue, getCharValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getMapObjectId, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, hasCustomProperty, removeProperty, setProperties, setValue, setValue, 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, getCharValue, getCharValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getMapObjectId, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, hasCustomProperty, removeProperty, setProperties, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueMethods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.ILayer
getHorizontalParallaxFactor, getId, getMap, getName, getOffset, getOffsetX, getOffsetY, getOpacity, getRenderType, getSizeInTiles, getTintColor, getVerticalParallaxFactor, isVisible, setHeight, setName, setOpacity, setRenderType, setTintColor, setVisible, setWidth
-
Constructor Details
-
TileLayer
public TileLayer()Instantiates a newTileLayerinstance. -
TileLayer
Instantiates a newTileLayerinstance with the specified data.- Parameters:
data- The tile data of this instance.
-
-
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:
-
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:
-
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
-