21 #ifndef HX3D_UTILS_CALLBACKTIMER 22 #define HX3D_UTILS_CALLBACKTIMER 24 #include "hx3d/utils/timer.hpp" 50 CallbackTimer(
float delay, std::function<
void()>
function,
bool loop =
false);
60 void initialize(
float delay, std::function<
void()>
function,
bool loop =
false);
95 std::function<void()> _function;
void reset()
Reset the timer.
void update(float delta)
Update the timer.
Improved timer with callback execution.
void initialize(float delay, std::function< void()> function, bool loop=false)
Initialize the timer. The delay is in milliseconds.
long remaining()
Get the remaining time in milliseconds.
bool isLooping()
Is the timer looping ?
CallbackTimer()
Create an uninitialized callback timer.
bool hasEnded()
Did the timer ended ?