Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | Static Public Member Functions | List of all members
core::res::RunWalkAnimations Class Reference

Extension of animation data that loads and combines the animations for each movement direction into a single animation with different states. More...

#include <RunWalkAnimations.hpp>

+ Inheritance diagram for core::res::RunWalkAnimations:

Public Member Functions

bool loadFromDirectory (const std::string &path)
 Loads the walking animations from the given directory. More...
 
float getMaxStateLength () const
 Returns the maximum length of any substate animation in seconds. More...
 

Static Public Member Functions

static std::size_t getStateFromDirection (bl::tmap::Direction dir, bool running)
 Maps the movement direction to the state index. More...
 

Detailed Description

Extension of animation data that loads and combines the animations for each movement direction into a single animation with different states.

Definition at line 18 of file RunWalkAnimations.hpp.

Member Function Documentation

◆ getMaxStateLength()

float core::res::RunWalkAnimations::getMaxStateLength ( ) const
inline

Returns the maximum length of any substate animation in seconds.

Definition at line 40 of file RunWalkAnimations.hpp.

◆ getStateFromDirection()

static std::size_t core::res::RunWalkAnimations::getStateFromDirection ( bl::tmap::Direction  dir,
bool  running 
)
inlinestatic

Maps the movement direction to the state index.

Parameters
dirThe direction to map to
Returns
The state index to use for the given walking direction

Definition at line 34 of file RunWalkAnimations.hpp.

◆ loadFromDirectory()

bool core::res::RunWalkAnimations::loadFromDirectory ( const std::string &  path)

Loads the walking animations from the given directory.

Parameters
pathThe full path to the directory to load from
Returns
True if the animations were all loaded successfully, false on error

Definition at line 9 of file RunWalkAnimations.cpp.


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