Package com.badlogic.gdx.maps.tiled
Class TiledMapTileLayer
- java.lang.Object
-
- com.badlogic.gdx.maps.MapLayer
-
- com.badlogic.gdx.maps.tiled.TiledMapTileLayer
-
public class TiledMapTileLayer extends MapLayer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTiledMapTileLayer.Cell
-
Constructor Summary
Constructors Constructor Description TiledMapTileLayer(int width, int height, int tileWidth, int tileHeight)Creates TiledMap layer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TiledMapTileLayer.CellgetCell(int x, int y)intgetHeight()intgetTileHeight()intgetTileWidth()intgetWidth()voidsetCell(int x, int y, TiledMapTileLayer.Cell cell)Sets theTiledMapTileLayer.Cellat the given coordinates.-
Methods inherited from class com.badlogic.gdx.maps.MapLayer
calculateRenderOffsets, getName, getObjects, getOffsetX, getOffsetY, getOpacity, getParallaxX, getParallaxY, getParent, getProperties, getRenderOffsetX, getRenderOffsetY, invalidateRenderOffset, isVisible, setName, setOffsetX, setOffsetY, setOpacity, setParallaxX, setParallaxY, setParent, setVisible
-
-
-
-
Method Detail
-
getWidth
public int getWidth()
- Returns:
- layer's width in tiles
-
getHeight
public int getHeight()
- Returns:
- layer's height in tiles
-
getTileWidth
public int getTileWidth()
- Returns:
- tiles' width in pixels
-
getTileHeight
public int getTileHeight()
- Returns:
- tiles' height in pixels
-
getCell
public TiledMapTileLayer.Cell getCell(int x, int y)
- Parameters:
x- X coordinatey- Y coordinate- Returns:
TiledMapTileLayer.Cellat (x, y)
-
setCell
public void setCell(int x, int y, TiledMapTileLayer.Cell cell)Sets theTiledMapTileLayer.Cellat the given coordinates.- Parameters:
x- X coordinatey- Y coordinatecell- theTiledMapTileLayer.Cellto set at the given coordinates.
-
-