21 #ifndef HX3D_UTILS_TIMER_MANAGER 22 #define HX3D_UTILS_TIMER_MANAGER 24 #include "hx3d/utils/callback_timer.hpp" 54 void createNamedTimer(std::string name,
float delay, std::function<
void()> callback,
bool loop =
false);
99 std::map<std::string, CallbackTimer> _registered;
100 std::vector<CallbackTimer> _temporaries;
void addTemporaryTimer(CallbackTimer &timer)
Add an existing temporary timer.
void clear()
Clear all the timers.
void resetNamedTimer(std::string name)
Reset a named timer.
Improved timer with callback execution.
void removeNamedTimer(std::string name)
Remove a named timer.
Manages multiple callback timers.
void createTemporaryTimer(float delay, std::function< void()> callback, bool loop=false)
Create a new temporary timer.
void update(float delta)
Update the timers.
void createNamedTimer(std::string name, float delay, std::function< void()> callback, bool loop=false)
Create a new named timer.
void addNamedTimer(std::string name, CallbackTimer &timer)
Add an existing named timer.