FastEngine 0.9.4
A multiplayer oriented 2D engine made with Vulkan.
Loading...
Searching...
No Matches
fge::TileLayer::Tile Class Reference

A tile that contain drawing information and its global id. More...

#include <C_tilelayer.hpp>

Public Member Functions

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< TileSetgetTileSet () const
 Get the associated tileset pointer.
TileData const * getTileData () const

Detailed Description

A tile that contain drawing information and its global id.

Member Function Documentation

◆ 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
colorThe 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
gidThe global id of the tile

◆ setPosition()

void fge::TileLayer::Tile::setPosition ( Vector2f const & position)

Set the local position of the tile.

Parameters
positionThe 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
tileSetThe associated tileset pointer

The documentation for this class was generated from the following file: