Package com.csse3200.game.areas.terrain
Class CCell
java.lang.Object
com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell
com.csse3200.game.areas.terrain.CCell
public class CCell
extends com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell
The CCell class holds the possible tiles for the cell.
-
Field Summary
Fields inherited from class com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell
ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDown()
Get the possible tiles that can join with the bottom of this cell.boolean
getLeft()
Get the possible tiles that can join with the left of this cell.getRight()
Get the possible tiles that can join with the right of this cell.getUp()
Get the possible tiles that can join with the top of this cell.setTile
(Tile tile, TerrainResource terrainResource) Set the tile and also mean the cell is collapsed and confirm all possible tiles.Methods inherited from class com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell
getFlipHorizontally, getFlipVertically, getRotation, getTile, setFlipHorizontally, setFlipVertically, setRotation, setTile
-
Constructor Details
-
CCell
public CCell()
-
-
Method Details
-
getUp
Get the possible tiles that can join with the top of this cell.- Returns:
- The possible tiles for the cell
-
getDown
Get the possible tiles that can join with the bottom of this cell.- Returns:
- The possible tiles for the cell
-
getLeft
Get the possible tiles that can join with the left of this cell.- Returns:
- The possible tiles for the cell
-
getRight
Get the possible tiles that can join with the right of this cell.- Returns:
- The possible tiles for the cell
-
setTile
Set the tile and also mean the cell is collapsed and confirm all possible tiles.- Parameters:
tile
- The tile to setterrainResource
- The terrain resource to use for setting the tile- Returns:
- this cell object
-
getIsCollapsed
public boolean getIsCollapsed()
-