timers

PP. timers

The list of timers applied in the scene
Source:

Methods

(static) add_timer(scene, delay, function_to_call, loop)

Create a timer to start a function after a detemrined delay
Source:
Parameters:
Name Type Description
scene object The scene in which the timer take placetypeof s === "object"
delay number The amount of milliseconds to be waited
function_to_call function Callback function to call when an event occurred. The function must accept one parameter: the current scene.
loop boolean Whether the time is infinite (true) or single-short (false)

(static) get_time(s)

Get the current time of the game
Source:
Parameters:
Name Type Description
s object the scene
Returns:
the seconds form the begining of the execution of the scene