Package com.badlogic.gdx.maps.tiled
Class TiledMapTileLayer.Cell
- java.lang.Object
-
- com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell
-
- Enclosing class:
- TiledMapTileLayer
public static class TiledMapTileLayer.Cell extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intROTATE_0static intROTATE_180static intROTATE_270static intROTATE_90
-
Constructor Summary
Constructors Constructor Description Cell()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetFlipHorizontally()booleangetFlipVertically()intgetRotation()TiledMapTilegetTile()TiledMapTileLayer.CellsetFlipHorizontally(boolean flipHorizontally)Sets whether to flip the tile horizontally.TiledMapTileLayer.CellsetFlipVertically(boolean flipVertically)Sets whether to flip the tile vertically.TiledMapTileLayer.CellsetRotation(int rotation)Sets the rotation of this cell, in 90 degree increments.TiledMapTileLayer.CellsetTile(TiledMapTile tile)Sets the tile to be used for this cell.
-
-
-
Field Detail
-
ROTATE_0
public static final int ROTATE_0
- See Also:
- Constant Field Values
-
ROTATE_90
public static final int ROTATE_90
- See Also:
- Constant Field Values
-
ROTATE_180
public static final int ROTATE_180
- See Also:
- Constant Field Values
-
ROTATE_270
public static final int ROTATE_270
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTile
public TiledMapTile getTile()
- Returns:
- The tile currently assigned to this cell.
-
setTile
public TiledMapTileLayer.Cell setTile(TiledMapTile tile)
Sets the tile to be used for this cell.- Parameters:
tile- theTiledMapTileto use for this cell.- Returns:
- this, for method chaining
-
getFlipHorizontally
public boolean getFlipHorizontally()
- Returns:
- Whether the tile should be flipped horizontally.
-
setFlipHorizontally
public TiledMapTileLayer.Cell setFlipHorizontally(boolean flipHorizontally)
Sets whether to flip the tile horizontally.- Parameters:
flipHorizontally- whether or not to flip the tile horizontally.- Returns:
- this, for method chaining
-
getFlipVertically
public boolean getFlipVertically()
- Returns:
- Whether the tile should be flipped vertically.
-
setFlipVertically
public TiledMapTileLayer.Cell setFlipVertically(boolean flipVertically)
Sets whether to flip the tile vertically.- Parameters:
flipVertically- whether or not this tile should be flipped vertically.- Returns:
- this, for method chaining
-
getRotation
public int getRotation()
- Returns:
- The rotation of this cell, in 90 degree increments.
-
setRotation
public TiledMapTileLayer.Cell setRotation(int rotation)
Sets the rotation of this cell, in 90 degree increments.- Parameters:
rotation- the rotation in 90 degree increments (see ints below).- Returns:
- this, for method chaining
-
-