Drag[en]gine Script Module DragonScript  1.23
Dragengine.Utils.TimerManager Class Reference

Manage timers. More...

Inheritance diagram for Dragengine.Utils.TimerManager:

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...
 

Detailed Description

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.

1.9

If you create a TimerManager besides the default TimerManager make sure to call giveUpAllTimers() to avoid memory leaks.

Member Function Documentation

◆ addTimer()

void Dragengine.Utils.TimerManager.addTimer ( Timer  timer)

Register timer.

◆ advance()

void Dragengine.Utils.TimerManager.advance ( float  elapsed)

Advance timers.

Timer implementation handles triggering. Ensures all timers are advanced once.

◆ advanceDefault() [1/2]

static void Dragengine.Utils.TimerManager.advanceDefault ( )
static

Advance timers of default timer manager.

Timer implementation handles triggering. Ensures all timers are advanced once.

◆ advanceDefault() [2/2]

static void Dragengine.Utils.TimerManager.advanceDefault ( float  elapsed)
static

Advance timers of default timer manager.

Timer implementation handles triggering. Ensures all timers are advanced once.

◆ giveUpAllTimersDefault()

static void Dragengine.Utils.TimerManager.giveUpAllTimersDefault ( )
static

Give up all timers of default timer manager and remove them.

Version
1.9

Use this call before exiting the game to cancel registered timers and properly cleaning them up to avoid memory leaks.

◆ new()

TimerManager Dragengine.Utils.TimerManager.new ( )

Create timer manager.

◆ removeTimer()

void Dragengine.Utils.TimerManager.removeTimer ( Timer  timer)

Unregister timer.


The documentation for this class was generated from the following file: