Timer
Info
Dependencies:
- None
Implementation:
Timer.d on GitHub
Timer is a better alternative to the timers that Gothic offers. The FrameFunctions and Anim8 packages are already based on it. It isn't possible to modify the current time, as this would only cause difficulties.
Initialization
Initialize with LeGo_Timer
flag.
Functions
Timer
Timer
Returns the current playing time. If a new game is started, the time is 0. It is measured in milliseconds.
The function returns current playing time in milliseconds.
TimerGT
TimerGT
Returns the current game time, but the timer is paused when the game is paused (in the menu or status screen).
The function returns current playing time in milliseconds, but without measuring time when game is paused.
TimerF
TimerF
Alias to Timer
function that returns the time as an Ikarus float value.
The function returns current playing time as an Ikarus float value.
Timer_SetPause
Timer_SetPause
Pauses the timer (and thus all FrameFunctions and running animations).
var int on
Pause on/off
Timer_SetPauseInMenu
Timer_SetPauseInMenu
The timer can automatically pause when the game is paused. (status screen, main menu...)
var int on
Automatic pause on/off
Timer_IsPaused
Timer_IsPaused
This can be used to query whether the timer is paused.
The function returns TRUE
if the timer is paused, FALSE
is returned otherwise.