Interface ITileLayer
- All Superinterfaces:
ICustomPropertyProvider
,ILayer
- All Known Implementing Classes:
TileLayer
public interface ITileLayer
extends ILayer
Method Summary
Modifier and Type Method Description 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.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 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
getHeight, getId, getMap, getName, getOffset, getOffsetX, getOffsetY, getOpacity, getRenderType, getSizeInTiles, getWidth, isVisible, setHeight, setName, setOpacity, setRenderType, setVisible, setWidth
Method Details
getTileByLocation
Gets the tile by location.- Parameters:
location
- the location- Returns:
- the tile by location
getTile
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.- 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
Sets the id of the tile at the specified map grid location.- 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
void setTile(int x, int y, int gid)Sets the id of the tile at the specified map grid location.- 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
java.util.List<ITile> getTiles()Gets the tiles.- Returns:
- the tiles