A tile that contain drawing information and its global id.
More...
#include <C_tilelayer.hpp>
|
void | setGid (TileId gid) |
| Set the global id of the tile.
|
|
TileId | getGid () const |
| Get the global id of the tile.
|
|
void | setPosition (fge::Vector2f const &position) |
| Set the local position of the tile.
|
|
fge::Vector2f const & | getPosition () const |
| Get the local position of the tile.
|
|
void | setColor (fge::Color const &color) |
| Set the color of the tile.
|
|
fge::Color | getColor () const |
| Get the color of the tile.
|
|
void | setTileSet (std::shared_ptr< fge::TileSet > tileSet) |
| Set the associated tileset pointer.
|
|
std::shared_ptr< fge::TileSet > const & | getTileSet () const |
| Get the associated tileset pointer.
|
|
A tile that contain drawing information and its global id.
◆ getColor()
fge::Color fge::TileLayer::Tile::getColor |
( |
| ) |
const |
|
nodiscard |
Get the color of the tile.
- Returns
- The color of the tile
◆ getGid()
TileId fge::TileLayer::Tile::getGid |
( |
| ) |
const |
|
nodiscard |
Get the global id of the tile.
- Returns
- The global id of the tile
◆ getPosition()
fge::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< fge::TileSet > const & fge::TileLayer::Tile::getTileSet |
( |
| ) |
const |
|
nodiscard |
Get the associated tileset pointer.
- Returns
- The associated tileset pointer
◆ setColor()
void fge::TileLayer::Tile::setColor |
( |
fge::Color const & | color | ) |
|
Set the color of the tile.
- Parameters
-
color | The color of the tile |
◆ setGid()
void fge::TileLayer::Tile::setGid |
( |
TileId | 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 |
( |
fge::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< fge::TileSet > | 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: