A tile that contain drawing information and its global id.
More...
#include <C_tilelayer.hpp>
|
void | setGid (GlobalTileId gid) |
| Set the global id of the tile.
|
GlobalTileId | getGid () const |
| Get the global id of the tile.
|
void | setPosition (Vector2f const &position) |
| Set the local position of the tile.
|
Vector2f const & | getPosition () const |
| Get the local position of the tile.
|
void | setColor (Color const &color) |
| Set the color of the tile.
|
Color | getColor () const |
| Get the color of the tile.
|
void | setTileSet (std::shared_ptr< TileSet > const &tileSet) |
| Set the associated tileset pointer.
|
std::shared_ptr< TileSet > | getTileSet () const |
| Get the associated tileset pointer.
|
TileData const * | getTileData () const |
A tile that contain drawing information and its global id.
◆ getColor()
Color fge::TileLayer::Tile::getColor |
( |
| ) |
const |
|
nodiscard |
Get the color of the tile.
- Returns
- The color of the tile
◆ getGid()
GlobalTileId fge::TileLayer::Tile::getGid |
( |
| ) |
const |
|
nodiscard |
Get the global id of the tile.
- Returns
- The global id of the tile
◆ getPosition()
Vector2f const & fge::TileLayer::Tile::getPosition |
( |
| ) |
const |
|
nodiscard |
Get the local position of the tile.
- Returns
- The local position of the tile
◆ getTileSet()
std::shared_ptr< TileSet > fge::TileLayer::Tile::getTileSet |
( |
| ) |
const |
|
nodiscard |
Get the associated tileset pointer.
- Returns
- The associated tileset pointer
◆ setColor()
void fge::TileLayer::Tile::setColor |
( |
Color const & | color | ) |
|
Set the color of the tile.
- Parameters
-
color | The color of the tile |
◆ setGid()
void fge::TileLayer::Tile::setGid |
( |
GlobalTileId | gid | ) |
|
Set the global id of the tile.
This will automatically update texture coordinates.
- Parameters
-
gid | The global id of the tile |
◆ setPosition()
void fge::TileLayer::Tile::setPosition |
( |
Vector2f const & | position | ) |
|
Set the local position of the tile.
- Parameters
-
position | The local position of the tile |
◆ setTileSet()
void fge::TileLayer::Tile::setTileSet |
( |
std::shared_ptr< TileSet > const & | tileSet | ) |
|
Set the associated tileset pointer.
This will automatically update texture coordinates and positions.
- Parameters
-
tileSet | The associated tileset pointer |
The documentation for this class was generated from the following file: