tmxparser  2.1.0
 All Classes Functions Variables Pages
Public Member Functions | List of all members
Tmx::Tile Class Reference

Class to contain information about every tile in the tileset/tiles element. More...

#include <TmxTile.h>

Public Member Functions

 Tile (int id)
 Construct a new tile with the given id.
 
void Parse (const tinyxml2::XMLNode *tileNode)
 Parse a tile node.
 
int GetId () const
 Get the Id. (relative to the tileset)
 
bool IsAnimated () const
 Returns true if the tile is animated (has one or more animation frames)
 
int GetFrameCount () const
 Returns the number of frames of the animation. If the tile is not animated, returns 0.
 
unsigned int GetTotalDuration () const
 Returns the total duration of the animation, in milliseconds, or 0 if the tile is not animated. More...
 
const Tmx::ImageGetImage () const
 Returns the tile image if defined.
 
std::string GetType () const
 Returns the object type of the tile.
 
const std::vector
< AnimationFrame > & 
GetFrames () const
 Returns the frames of the animation.
 
const Tmx::PropertySetGetProperties () const
 Get a set of properties regarding the tile.
 
const Tmx::ObjectGroupGetObjectGroup () const
 
const Tmx::PropertySetGetObjectGroupProperties () const
 
std::vector< Tmx::Object * > GetObjects () const
 Get set of Collision Objects, convenience function.
 
bool HasObjects () const
 Returns true if tile has Collision Objects.
 
const Tmx::ObjectGetObject (int index) const
 Get a single object.
 
int GetNumObjects () const
 Get the number of objects in the list.
 

Detailed Description

Class to contain information about every tile in the tileset/tiles element.

It may expand if there are more elements or attributes added into the the tile element. This class also contains a property set.

Member Function Documentation

unsigned int Tmx::Tile::GetTotalDuration ( ) const
inline

Returns the total duration of the animation, in milliseconds, or 0 if the tile is not animated.


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