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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the possible tiles that can join with the bottom of this cell.
    boolean
     
    Get the possible tiles that can join with the left of this cell.
    Get the possible tiles that can join with the right of this cell.
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CCell

      public CCell()
  • Method Details

    • getUp

      public BitSet getUp()
      Get the possible tiles that can join with the top of this cell.
      Returns:
      The possible tiles for the cell
    • getDown

      public BitSet getDown()
      Get the possible tiles that can join with the bottom of this cell.
      Returns:
      The possible tiles for the cell
    • getLeft

      public BitSet getLeft()
      Get the possible tiles that can join with the left of this cell.
      Returns:
      The possible tiles for the cell
    • getRight

      public BitSet getRight()
      Get the possible tiles that can join with the right of this cell.
      Returns:
      The possible tiles for the cell
    • setTile

      public CCell setTile(Tile tile, TerrainResource terrainResource)
      Set the tile and also mean the cell is collapsed and confirm all possible tiles.
      Parameters:
      tile - The tile to set
      terrainResource - The terrain resource to use for setting the tile
      Returns:
      this cell object
    • getIsCollapsed

      public boolean getIsCollapsed()