Drag[en]gine Script Module DragonScript
1.23
|
Manage timers. More...
Public Member Functions | |
void | addTimer (Timer timer) |
Register timer. More... | |
void | advance (float elapsed) |
Advance timers. More... | |
TimerManager | new () |
Create timer manager. More... | |
void | removeTimer (Timer timer) |
Unregister timer. More... | |
Static Public Member Functions | |
static void | advanceDefault () |
Advance timers of default timer manager. More... | |
static void | advanceDefault (float elapsed) |
Advance timers of default timer manager. More... | |
static void | giveUpAllTimersDefault () |
Give up all timers of default timer manager and remove them. More... | |
Manage timers.
Provides default timer manager for simple timer creation. Individual instances of timer managers can be created to provide timer handling at different speeds if required.
If you create a TimerManager besides the default TimerManager make sure to call giveUpAllTimers() to avoid memory leaks.
void Dragengine.Utils.TimerManager.addTimer | ( | Timer | timer | ) |
Register timer.
void Dragengine.Utils.TimerManager.advance | ( | float | elapsed | ) |
Advance timers.
Timer implementation handles triggering. Ensures all timers are advanced once.
|
static |
Advance timers of default timer manager.
Timer implementation handles triggering. Ensures all timers are advanced once.
|
static |
Advance timers of default timer manager.
Timer implementation handles triggering. Ensures all timers are advanced once.
|
static |
Give up all timers of default timer manager and remove them.
Use this call before exiting the game to cancel registered timers and properly cleaning them up to avoid memory leaks.
TimerManager Dragengine.Utils.TimerManager.new | ( | ) |
Create timer manager.
void Dragengine.Utils.TimerManager.removeTimer | ( | Timer | timer | ) |
Unregister timer.