#include <tb_tile_system.h>
Public Member Functions | |
TileSystem (void) | |
virtual | ~TileSystem (void) |
void | ClearMap (void) |
tbCore::tbString | GetMapPropertyAsString (const tbCore::tbString &propertyName) const |
int | GetMapPropertyAsInteger (const tbCore::tbString &propertyName) const |
bool | GetMapPropertyAsBoolean (const tbCore::tbString &propertyName) const |
void | SetPropertiesForMap (const tbCore::DynamicStructure &mapProperties) |
void | AddTileSet (const tbCore::tbString &tilesetName, const tbGraphics::SpriteMap &spriteMap, const tbCore::DynamicStructure &tileSetProperties=tbCore::DynamicStructure::kNullValue) |
AboutTileContainer | FindTilesWithProperty (const tbCore::tbString &tileProperty, bool onlyVisibleLayers=false) const |
AboutTileContainer | FindTilesWithPropertyEquals (const tbCore::tbString &tileProperty, bool propertyValue, bool onlyVisibleLayers=false) const |
AboutTileContainer | FindTilesWithPropertyEquals (const tbCore::tbString &tileProperty, int propertyValue, bool onlyVisibleLayers=false) const |
AboutTileContainer | FindTilesWithPropertyEquals (const tbCore::tbString &tileProperty, const tbCore::tbString &propertyValue, bool onlyVisibleLayers=false) const |
void | SetPropertiesForTile (const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::DynamicStructure &tileProperties) |
tbCore::tbString | GetTilePropertyAsString (const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName) const |
int | GetTilePropertyAsInteger (const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName) const |
bool | GetTilePropertyAsBoolean (const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName) const |
void | SetTileProperty (const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName, const tbCore::tbString &propertyValue) |
void | SetTileProperty (const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName, const int propertyValue) |
void | SetTileProperty (const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName, const bool propertyValue) |
void | AddTileLayer (const tbCore::tbString &tileLayerName, const std::vector< TileIndex > &tileData, const tbCore::tbString &tileSetName, const TileLocation &columnCount, const TileLocation &rowCount) |
void | AddTileLayer (const tbCore::tbString &tileLayerName, const std::vector< TileIndex > &tileData, const std::vector< TileSetIndex > &tileSetData, const TileLocation &columnCount, const TileLocation &rowCount) |
void | SetLayerVisible (const tbCore::tbString &tileLayerName, const bool isVisible) |
bool | MoveEntity (const tbMath::Vector2 ¤tPosition, tbMath::Vector2 &finalPosition, const TurtleBrains::Math::Unstable::BoundingVolume &boundingVolume) const |
bool | IsPointInSolid (const tbMath::Vector2 &pointPosition) const |
void | UpdateColliderInformation (void) |
![]() | |
GraphicList (void) | |
virtual | ~GraphicList (void) |
void | AddGraphic (Graphic *graphic) |
void | AddGraphic (Graphic &graphic) |
void | RemoveGraphic (Graphic *graphic) |
virtual void | SetColor (const tbGraphics::Color &newColor) |
![]() | |
Graphic (void) | |
Graphic (const Graphic &other) | |
virtual | ~Graphic (void) |
bool | IsActive (void) const |
void | SetActive (const bool isActive) |
void | Update (const float deltaTime) |
bool | IsVisible (void) const |
void | SetVisible (const bool isVisible) |
void | Render (void) const |
const tbMath::Vector2 & | GetPosition (void) const |
void | SetPosition (const float x, const float y) |
void | SetPosition (const tbMath::Vector2 &position) |
float | GetDepth (void) const |
void | SetDepth (const float newDepth) |
bool | IsRelative (void) const |
Protected Member Functions | |
virtual void | OnRender (void) const override |
![]() | |
virtual void | OnUpdate (const float deltaTime) override |
![]() | |
const Color & | GetColor (void) const |
The TileSystem contains details about all the different tiles used as well as stores multiple tile layers to be rendered. Loads tile maps edited with Tiled when saved in the json format, although only basic support will be added in this first version.
TurtleBrains::Game::TileSystem::TileSystem | ( | void | ) |
Constructs an empty TileSystem with no tilesets, no tiles and no layers.
|
virtual |
Destroys the TileSystem object which will clean up all resources for each of the layers and tilesets.
void TurtleBrains::Game::TileSystem::AddTileLayer | ( | const tbCore::tbString & | tileLayerName, |
const std::vector< TileIndex > & | tileData, | ||
const tbCore::tbString & | tileSetName, | ||
const TileLocation & | columnCount, | ||
const TileLocation & | rowCount | ||
) |
TODO: TIM: Documentation: Teach the user how to use this.
void TurtleBrains::Game::TileSystem::AddTileLayer | ( | const tbCore::tbString & | tileLayerName, |
const std::vector< TileIndex > & | tileData, | ||
const std::vector< TileSetIndex > & | tileSetData, | ||
const TileLocation & | columnCount, | ||
const TileLocation & | rowCount | ||
) |
TODO: TIM: Documentation: Teach the user how to use this.
void TurtleBrains::Game::TileSystem::AddTileSet | ( | const tbCore::tbString & | tilesetName, |
const tbGraphics::SpriteMap & | spriteMap, | ||
const tbCore::DynamicStructure & | tileSetProperties = tbCore::DynamicStructure::kNullValue |
||
) |
Adds a tileset with a given name to the TileSystem.
void TurtleBrains::Game::TileSystem::ClearMap | ( | void | ) |
Clean up all resources for each of the layers and tilesets, will contain no tilesets, layers or tiles after this is complete.
AboutTileContainer TurtleBrains::Game::TileSystem::FindTilesWithProperty | ( | const tbCore::tbString & | tileProperty, |
bool | onlyVisibleLayers = false |
||
) | const |
TODO: TIM: Documentation: Teach the user how to use this.
AboutTileContainer TurtleBrains::Game::TileSystem::FindTilesWithPropertyEquals | ( | const tbCore::tbString & | tileProperty, |
bool | propertyValue, | ||
bool | onlyVisibleLayers = false |
||
) | const |
TODO: TIM: Documentation: Teach the user how to use this.
AboutTileContainer TurtleBrains::Game::TileSystem::FindTilesWithPropertyEquals | ( | const tbCore::tbString & | tileProperty, |
int | propertyValue, | ||
bool | onlyVisibleLayers = false |
||
) | const |
TODO: TIM: Documentation: Teach the user how to use this.
AboutTileContainer TurtleBrains::Game::TileSystem::FindTilesWithPropertyEquals | ( | const tbCore::tbString & | tileProperty, |
const tbCore::tbString & | propertyValue, | ||
bool | onlyVisibleLayers = false |
||
) | const |
TODO: TIM: Documentation: Teach the user how to use this.
bool TurtleBrains::Game::TileSystem::GetMapPropertyAsBoolean | ( | const tbCore::tbString & | propertyName | ) | const |
TODO: TIM: Documentation: Teach the user how to use this.
int TurtleBrains::Game::TileSystem::GetMapPropertyAsInteger | ( | const tbCore::tbString & | propertyName | ) | const |
TODO: TIM: Documentation: Teach the user how to use this.
tbCore::tbString TurtleBrains::Game::TileSystem::GetMapPropertyAsString | ( | const tbCore::tbString & | propertyName | ) | const |
TODO: TIM: Documentation: Teach the user how to use this.
bool TurtleBrains::Game::TileSystem::GetTilePropertyAsBoolean | ( | const tbCore::tbString & | tileSetName, |
const TileIndex & | tileIndex, | ||
const tbCore::tbString & | propertyName | ||
) | const |
TODO: TIM: Documentation: Teach the user how to use this.
int TurtleBrains::Game::TileSystem::GetTilePropertyAsInteger | ( | const tbCore::tbString & | tileSetName, |
const TileIndex & | tileIndex, | ||
const tbCore::tbString & | propertyName | ||
) | const |
TODO: TIM: Documentation: Teach the user how to use this.
tbCore::tbString TurtleBrains::Game::TileSystem::GetTilePropertyAsString | ( | const tbCore::tbString & | tileSetName, |
const TileIndex & | tileIndex, | ||
const tbCore::tbString & | propertyName | ||
) | const |
TODO: TIM: Documentation: Teach the user how to use this.
bool TurtleBrains::Game::TileSystem::IsPointInSolid | ( | const tbMath::Vector2 & | pointPosition | ) | const |
TODO: TIM: Documentation: Teach the user how to use this.
bool TurtleBrains::Game::TileSystem::MoveEntity | ( | const tbMath::Vector2 & | currentPosition, |
tbMath::Vector2 & | finalPosition, | ||
const TurtleBrains::Math::Unstable::BoundingVolume & | boundingVolume | ||
) | const |
TODO: TIM: Documentation: Teach the user how to use this.
|
overrideprotectedvirtual |
TODO: TIM: Documentation: Teach the user how to use this.
Reimplemented from TurtleBrains::Graphics::GraphicList.
void TurtleBrains::Game::TileSystem::SetLayerVisible | ( | const tbCore::tbString & | tileLayerName, |
const bool | isVisible | ||
) |
TODO: TIM: Documentation: Teach the user how to use this.
void TurtleBrains::Game::TileSystem::SetPropertiesForMap | ( | const tbCore::DynamicStructure & | mapProperties | ) |
TODO: TIM: Documentation: Teach the user how to use this.
void TurtleBrains::Game::TileSystem::SetPropertiesForTile | ( | const tbCore::tbString & | tileSetName, |
const TileIndex & | tileIndex, | ||
const tbCore::DynamicStructure & | tileProperties | ||
) |
TODO: TIM: Documentation: Teach the user how to use this.
void TurtleBrains::Game::TileSystem::SetTileProperty | ( | const tbCore::tbString & | tileSetName, |
const TileIndex & | tileIndex, | ||
const tbCore::tbString & | propertyName, | ||
const tbCore::tbString & | propertyValue | ||
) |
TODO: TIM: Documentation: Teach the user how to use this.
void TurtleBrains::Game::TileSystem::SetTileProperty | ( | const tbCore::tbString & | tileSetName, |
const TileIndex & | tileIndex, | ||
const tbCore::tbString & | propertyName, | ||
const int | propertyValue | ||
) |
TODO: TIM: Documentation: Teach the user how to use this.
void TurtleBrains::Game::TileSystem::SetTileProperty | ( | const tbCore::tbString & | tileSetName, |
const TileIndex & | tileIndex, | ||
const tbCore::tbString & | propertyName, | ||
const bool | propertyValue | ||
) |
TODO: TIM: Documentation: Teach the user how to use this.
void TurtleBrains::Game::TileSystem::UpdateColliderInformation | ( | void | ) |
TODO: TIM: Documentation: Teach the user how to use this.