hx3d
1
2D/3D Simple Game Framework
|
Manages multiple callback timers. More...
#include <timer_manager.hpp>
Public Member Functions | |
void | addNamedTimer (std::string name, CallbackTimer &timer) |
Add an existing named timer. More... | |
void | createNamedTimer (std::string name, float delay, std::function< void()> callback, bool loop=false) |
Create a new named timer. More... | |
void | resetNamedTimer (std::string name) |
Reset a named timer. More... | |
void | removeNamedTimer (std::string name) |
Remove a named timer. More... | |
void | addTemporaryTimer (CallbackTimer &timer) |
Add an existing temporary timer. More... | |
void | createTemporaryTimer (float delay, std::function< void()> callback, bool loop=false) |
Create a new temporary timer. More... | |
void | update (float delta) |
Update the timers. More... | |
void | clear () |
Clear all the timers. | |
Manages multiple callback timers.
Definition at line 34 of file timer_manager.hpp.
void hx3d::TimerManager::addNamedTimer | ( | std::string | name, |
CallbackTimer & | timer | ||
) |
Add an existing named timer.
name | Name |
timer | Timer |
Definition at line 30 of file timer_manager.cpp.
void hx3d::TimerManager::addTemporaryTimer | ( | CallbackTimer & | timer | ) |
Add an existing temporary timer.
timer | Timer |
Definition at line 48 of file timer_manager.cpp.
void hx3d::TimerManager::createNamedTimer | ( | std::string | name, |
float | delay, | ||
std::function< void()> | callback, | ||
bool | loop = false |
||
) |
Create a new named timer.
name | Name |
delay | Delay before callback activation |
callback | Callback to execute |
loop | Loop ? |
Definition at line 34 of file timer_manager.cpp.
void hx3d::TimerManager::createTemporaryTimer | ( | float | delay, |
std::function< void()> | callback, | ||
bool | loop = false |
||
) |
Create a new temporary timer.
delay | Delay before callback activation |
callback | Callback to execute |
loop | Loop ? |
Definition at line 52 of file timer_manager.cpp.
void hx3d::TimerManager::removeNamedTimer | ( | std::string | name | ) |
void hx3d::TimerManager::resetNamedTimer | ( | std::string | name | ) |
void hx3d::TimerManager::update | ( | float | delta | ) |