Meteor2D  dev internal
Meteor is a lightweight 2D game engine.
Loading...
Searching...
No Matches
meteor::MAnimationMap Class Reference

This class holds the relationship between SpriteSheets and Animation name. Needs to be created using the loadMap function. More...

#include <animationmap.h>

Inheritance diagram for meteor::MAnimationMap:

Public Member Functions

MSpriteSheetgetAnim (std::string name)
 get the sprite-sheet for animation to play
 
MSpriteSheetgetDefault ()
 get the default spritesheet for animation
 
- Public Member Functions inherited from meteor::MEntity
virtual bool equals (MEntity *other)
 Checks equality between two entities.
 
std::string getName ()
 
void setName (std::string name)
 Sets name of entity.
 
virtual std::string toString ()
 Get this object as a string.
 

Static Public Member Functions

static MAnimationMaploadMap (std::string fileName)
 Loads an AnimationMap from a file.
 

Additional Inherited Members

- Protected Attributes inherited from meteor::MEntity
std::string name
 

Detailed Description

This class holds the relationship between SpriteSheets and Animation name. Needs to be created using the loadMap function.

Member Function Documentation

◆ getAnim()

MSpriteSheet * meteor::MAnimationMap::getAnim ( std::string name)

get the sprite-sheet for animation to play

Parameters
nameAnimation clip name.
Returns
Ptr to SpriteSheet instance.

◆ getDefault()

MSpriteSheet * meteor::MAnimationMap::getDefault ( )

get the default spritesheet for animation

Returns
Ptr to the first SpriteSheet instance

◆ loadMap()

static MAnimationMap * meteor::MAnimationMap::loadMap ( std::string fileName)
static

Loads an AnimationMap from a file.

Parameters
fileNamerelative path to file. evaluated to resS\anim\<fileName>
Returns
Ptr to AnimationMap instance