Platform Data Engine 0.0.1
A data-driven game engine for platformers
PlatformDataEngine::Tileset Class Reference

Defines a tileset used in a tmx map. This is what actually gets drawn when target.draw(tileMap) is called, it will loop through all the tilesets and draw them each in a separate draw call More...

#include <Tileset.h>

Inheritance diagram for PlatformDataEngine::Tileset:

Public Member Functions

 Tileset (const std::string &imagePath, int tileSize, const std::string &shaderPath="")
 Constructor
 
const TileTexturegetTileTexture (int tileIdx) const
 Gets the tile texture. More...
 
void registerSprite (TileSprite *sprite)
 
void deregisterSprite (TileSprite *sprite)
 
virtual void draw (sf::RenderTarget &target, sf::RenderStates states) const
 
void update (const float &dt, const float &elapsedTime)
 
int getTileSize () const
 
std::shared_ptr< sf::Shader > getShader () const
 

Detailed Description

Defines a tileset used in a tmx map. This is what actually gets drawn when target.draw(tileMap) is called, it will loop through all the tilesets and draw them each in a separate draw call

Member Function Documentation

◆ getTileTexture()

const TileTexture & Tileset::getTileTexture ( int  tileIdx) const

Gets the tile texture.

Returns
The tile texture.

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