Class Tile

class Tile

A tile that may be placed in the world.

Public Functions

bool isPlaced() const

Check if it was placed or not.

void place(AtlasTile atlasTile, Vector2 worldCoords)

Place the tile using a source AtlasTile and world coordinates.

Parameters:
  • atlasTile – The source atlas tile from a TileSet.

  • worldCoords – A Vector2, representing the coordinates on the world where it will be placed.

void erase()

Erase the tile, no longer to be shown in-game.

AtlasTile getAtlasTile() const

Get the source AtlasTile that originates from the used TileSet.

Returns:

The source AtlasTile.

Vector2 getWorldCoords() const

Get the world coordinates, at which the Tile is placed.

Returns:

The world coordinates.