Middle Europe Productions Library  alpha 1.3.3
Public Member Functions | List of all members
MEP::AnimationManager Class Reference

Designed to control a set of animations. More...

#include <AnimationManager.h>

Public Member Functions

 AnimationManager (BaseWindow &base)
 
template<typename X >
void add (X *animation, MEP::U_int32 ID, MEP::U_int32 group=-1, MEP::U_int32 renderGroup=-1)
 
template<typename X >
X & get (MEP::U_int32 ID, MEP::U_int32 group=-1)
 
template<typename X >
void run (const Direction direc, MEP::U_int32 ID, MEP::U_int32 group=-1, sf::Time currentTime=sf::Time::Zero)
 
void runGroup (const Direction direc, MEP::U_int32 group=-1, sf::Time currentTime=sf::Time::Zero)
 
template<typename Method >
void executeGroup (Method method, MEP::U_int32 group=-1)
 
void debugOutput (std::ostream &out)
 

Detailed Description

Designed to control a set of animations.

Constructor & Destructor Documentation

◆ AnimationManager()

MEP::AnimationManager::AnimationManager ( BaseWindow base)
inline

Constructor with the automatic assignment of the values to the BaseWindow Drawable container.

Member Function Documentation

◆ add()

template<typename X >
void MEP::AnimationManager::add ( X *  animation,
MEP::U_int32  ID,
MEP::U_int32  group = -1,
MEP::U_int32  renderGroup = -1 
)
inline

Addition.

◆ debugOutput()

void MEP::AnimationManager::debugOutput ( std::ostream &  out)
inline

Outputs the debug information.

◆ executeGroup()

template<typename Method >
void MEP::AnimationManager::executeGroup ( Method  method,
MEP::U_int32  group = -1 
)
inline

Execute a method for a group of objects. Example: [&direc, &currentTime](auto& x) { x.second->run(direc, currentTime); }, group); }, will run the animation.

◆ get()

template<typename X >
X& MEP::AnimationManager::get ( MEP::U_int32  ID,
MEP::U_int32  group = -1 
)
inline

Outputs the animation.

◆ run()

template<typename X >
void MEP::AnimationManager::run ( const Direction  direc,
MEP::U_int32  ID,
MEP::U_int32  group = -1,
sf::Time  currentTime = sf::Time::Zero 
)
inline

Run the animation.

◆ runGroup()

void MEP::AnimationManager::runGroup ( const Direction  direc,
MEP::U_int32  group = -1,
sf::Time  currentTime = sf::Time::Zero 
)
inline

Runs a a group of animations.