Interface ITileLayer
- All Superinterfaces:
ICustomPropertyProvider,ILayer
- All Known Implementing Classes:
TileLayer
-
Method Summary
Modifier and TypeMethodDescriptiongetTile(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.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 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
getHeight, getHorizontalParallaxFactor, getId, getMap, getName, getOffset, getOffsetX, getOffsetY, getOpacity, getRenderType, getSizeInTiles, getTintColor, getVerticalParallaxFactor, getWidth, isVisible, setHeight, setName, setOpacity, setRenderType, setTintColor, 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:
-
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:
-
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
Gets the tiles.- Returns:
- the tiles
-