Data representation of a tile in a Map TileLayer.
More...
#include <Tile.hpp>
Data representation of a tile in a Map TileLayer.
Definition at line 30 of file Tile.hpp.
◆ IdType
◆ Tile() [1/3]
core::map::Tile::Tile |
( |
| ) |
|
Makes a blank tile.
Definition at line 10 of file Tile.cpp.
◆ Tile() [2/3]
core::map::Tile::Tile |
( |
const Tile & |
copy | ) |
|
|
default |
Copy constructs from the given tile.
- Parameters
-
◆ Tile() [3/3]
core::map::Tile::Tile |
( |
IdType |
id, |
|
|
bool |
isAnim = false |
|
) |
| |
Builds a tile with the given info.
- Parameters
-
id | The id of the tile in the tileset |
isAnim | True if the tile is an animation, false if it is an image |
Definition at line 14 of file Tile.cpp.
◆ id()
Returns the id of the image or animation of this tile.
- Returns
- IdType The id of the tile in the tileset
Definition at line 22 of file Tile.cpp.
◆ isAnimation()
bool core::map::Tile::isAnimation |
( |
| ) |
const |
Returns whether this tile is an animation or not.
- Returns
- True if an animation, false if a still image
Definition at line 20 of file Tile.cpp.
◆ operator=()
Tile& core::map::Tile::operator= |
( |
const Tile & |
copy | ) |
|
|
default |
Copy constructs from the given tile.
- Parameters
-
- Returns
- A reference to this tile
◆ set()
void core::map::Tile::set |
( |
IdType |
id, |
|
|
bool |
anim |
|
) |
| |
Sets the information of the tile.
- Parameters
-
tileset | Reference to the Tileset being used |
id | The id of the image or animation in the Tileset |
anim | True if an animation, false if an image |
Definition at line 24 of file Tile.cpp.
◆ step()
void core::map::Tile::step |
( |
| ) |
|
Triggers the animation when the tile is stepped on.
Definition at line 29 of file Tile.cpp.
◆ bl::serial::SerializableObject< Tile >
friend struct bl::serial::SerializableObject< Tile > |
|
friend |
◆ editor::component::EditMap
◆ Map
◆ Blank
constexpr IdType core::map::Tile::Blank = 0 |
|
staticconstexpr |
Special id for blank tiles.
Definition at line 36 of file Tile.hpp.
The documentation for this class was generated from the following files: