YAGE  v0.1.1
Yet Another Game Engine
yage::SpriteSheet Class Reference

#include <spritesheet.h>

Public Member Functions

 SpriteSheet (std::string pngFileName, std::string jsonFileName)
 
void sprite (std::string spriteName) const
 
std::string fileContent (std::string jsonFileName) const
 

Private Member Functions

details::SpriteMap parseJson (int &width, int &height, const std::string &jsonContent) const
 

Private Attributes

Texture texture_
 
details::SpriteMap fileLocations_
 

Constructor & Destructor Documentation

◆ SpriteSheet()

yage::SpriteSheet::SpriteSheet ( std::string  pngFileName,
std::string  jsonFileName 
)

Member Function Documentation

◆ fileContent()

string yage::SpriteSheet::fileContent ( std::string  jsonFileName) const

◆ parseJson()

SpriteMap yage::SpriteSheet::parseJson ( int &  width,
int &  height,
const std::string &  jsonContent 
) const
private
Todo:
add the coordinate to the map

◆ sprite()

void yage::SpriteSheet::sprite ( std::string  spriteName) const

Member Data Documentation

◆ fileLocations_

details::SpriteMap yage::SpriteSheet::fileLocations_
private

◆ texture_

Texture yage::SpriteSheet::texture_
private

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