21 #include "hx3d/utils/callback_timer.hpp" 26 _timer(-1), _loop(false) {}
29 _timer(delay), _function(function), _loop(loop) {}
void update(float delta)
Update the timer.
void reset()
Reset the timer.
void initialize(long delay, bool loop=false)
Initialize the timer with a delay.
bool hasEnded()
Test if the timer has ended.
void reset()
Reset the timer.
void update(float delta)
Update the timer.
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.
long remaining()
Get the remaining time as milliseconds.
bool hasEnded()
Did the timer ended ?