java.lang.Object
com.csse3200.game.areas.terrain.tiles.Tile

public class Tile extends Object
Tile class to store tile data. A tile has a name, texture, and edge tiles.
  • Constructor Details

    • Tile

      public Tile(String name, com.badlogic.gdx.graphics.g2d.TextureRegion texture, List<String> edgeTiles, String centre)
  • Method Details

    • getName

      public String getName()
      Get the name of the tile.
      Returns:
      The name of the tile
    • getTexture

      public com.badlogic.gdx.graphics.g2d.TextureRegion getTexture()
      Get the texture of the tile.
      Returns:
      The texture of the tile
    • getEdgeTiles

      public List<String> getEdgeTiles()
      Get the edge tiles of the tile.
      Returns:
      The edge tiles of the tile
    • getCentre

      public String getCentre()
      Get the centre tile of the tile.
      Returns:
      The centre tile of the tile
    • getUp

      public BitSet getUp()
      Get the up edge tiles of the tile.
      Returns:
      The up edge tiles of the tile
    • getRight

      public BitSet getRight()
      Get the right edge tiles of the tile.
      Returns:
      The right edge tiles of the tile
    • getDown

      public BitSet getDown()
      Get the down edge tiles of the tile.
      Returns:
      The down edge tiles of the tile
    • getLeft

      public BitSet getLeft()
      Get the left edge tiles of the tile.
      Returns:
      The left edge tiles of the tile
    • setPossibleUp

      public void setPossibleUp(BitSet up)
      Set the possible up edge tiles of the tile.
      Parameters:
      up - All up edge tiles of the tile
    • setPossibleRight

      public void setPossibleRight(BitSet right)
      Set the possible right edge tiles of the tile.
      Parameters:
      right - All right edge tiles of the tile
    • setPossibleDown

      public void setPossibleDown(BitSet down)
      Set the possible down edge tiles of the tile.
      Parameters:
      down - All down edge tiles of the tile
    • setPossibleLeft

      public void setPossibleLeft(BitSet left)
      Set the possible left edge tiles of the tile.
      Parameters:
      left - All left edge tiles of the tile
    • isCollapsed

      public boolean isCollapsed()
    • setIsCollapsed

      public void setIsCollapsed(boolean isCollapsed)