|
hx3d
1
2D/3D Simple Game Framework
|
Improved timer with callback execution. More...
#include <callback_timer.hpp>
Public Member Functions | |
| CallbackTimer () | |
| Create an uninitialized callback timer. More... | |
| CallbackTimer (float delay, std::function< void()> function, bool loop=false) | |
| Create a callback timer using a delay and a function. The delay is in milliseconds. More... | |
| void | initialize (float delay, std::function< void()> function, bool loop=false) |
| Initialize the timer. The delay is in milliseconds. More... | |
| long | remaining () |
| Get the remaining time in milliseconds. More... | |
| void | reset () |
| Reset the timer. | |
| void | update (float delta) |
| Update the timer. | |
| bool | hasEnded () |
| Did the timer ended ? More... | |
| bool | isLooping () |
| Is the timer looping ? More... | |
Improved timer with callback execution.
Definition at line 33 of file callback_timer.hpp.
| hx3d::CallbackTimer::CallbackTimer | ( | ) |
Create an uninitialized callback timer.
See initialize.
Definition at line 25 of file callback_timer.cpp.
| hx3d::CallbackTimer::CallbackTimer | ( | float | delay, |
| std::function< void()> | function, | ||
| bool | loop = false |
||
| ) |
Create a callback timer using a delay and a function. The delay is in milliseconds.
| delay | Timer delay |
| function | Callback |
| loop | Loop ? |
Definition at line 28 of file callback_timer.cpp.
| bool hx3d::CallbackTimer::hasEnded | ( | ) |
| void hx3d::CallbackTimer::initialize | ( | float | delay, |
| std::function< void()> | function, | ||
| bool | loop = false |
||
| ) |
Initialize the timer. The delay is in milliseconds.
| delay | Timer delay |
| function | Callback |
| loop | Loop ? |
Definition at line 31 of file callback_timer.cpp.
| bool hx3d::CallbackTimer::isLooping | ( | ) |
| long hx3d::CallbackTimer::remaining | ( | ) |
Get the remaining time in milliseconds.
Definition at line 38 of file callback_timer.cpp.
1.8.11