Class Tile
java.lang.Object
com.csse3200.game.areas.terrain.tiles.Tile
Tile class to store tile data.
A tile has a name, texture, and edge tiles.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the centre tile of the tile.getDown()
Get the down edge tiles of the tile.Get the edge tiles of the tile.getLeft()
Get the left edge tiles of the tile.getName()
Get the name of the tile.getRight()
Get the right edge tiles of the tile.com.badlogic.gdx.graphics.g2d.TextureRegion
Get the texture of the tile.getUp()
Get the up edge tiles of the tile.boolean
void
setIsCollapsed
(boolean isCollapsed) void
setPossibleDown
(BitSet down) Set the possible down edge tiles of the tile.void
setPossibleLeft
(BitSet left) Set the possible left edge tiles of the tile.void
setPossibleRight
(BitSet right) Set the possible right edge tiles of the tile.void
setPossibleUp
(BitSet up) Set the possible up edge tiles of the tile.
-
Constructor Details
-
Tile
-
-
Method Details
-
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
Get the edge tiles of the tile.- Returns:
- The edge tiles of the tile
-
getCentre
Get the centre tile of the tile.- Returns:
- The centre tile of the tile
-
getUp
Get the up edge tiles of the tile.- Returns:
- The up edge tiles of the tile
-
getRight
Get the right edge tiles of the tile.- Returns:
- The right edge tiles of the tile
-
getDown
Get the down edge tiles of the tile.- Returns:
- The down edge tiles of the tile
-
getLeft
Get the left edge tiles of the tile.- Returns:
- The left edge tiles of the tile
-
setPossibleUp
Set the possible up edge tiles of the tile.- Parameters:
up
- All up edge tiles of the tile
-
setPossibleRight
Set the possible right edge tiles of the tile.- Parameters:
right
- All right edge tiles of the tile
-
setPossibleDown
Set the possible down edge tiles of the tile.- Parameters:
down
- All down edge tiles of the tile
-
setPossibleLeft
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)
-