Your browser does not support HTML5 canvas. Fork me on GitHub

Available Packages:

ClosureTimers

Source

function static timer.doAfter(real timeToWait, CallbackSingle cb) returns CallbackSingle

Source

Execute an action after a certain time. The callback object is automatically destroyed. Must be used on a timer acquired with `getTimer()` Example use: | someTimer.doAfter(10.0) -> | print("10 seconds later")

function doAfter(real timeToWait, CallbackSingle cb) returns CallbackSingle

Source

Execute an action after a certain time. The callback object is automatically destroyed. Example use: | doAfter(10.0) -> | print("10 seconds later")

function doAfterWithDialogue(real timeToWait, string titleText, Callback cb) returns CallbackSingle

Source

Execute an action after a certain time. The timer is accompanied by a visible timerdialog with the title text provided. The callback object is automatically destroyed. Example use: | doAfterWithDialogue(10.0, "Respawn in") -> | hero.revive() | print("10 seconds later")

function static timer.doPeriodically(real time, CallbackPeriodic cb) returns CallbackPeriodic

Source

Execute an action periodically. The callback has to be destroyed manually. Must be used on a timer acquired with `getTimer()` Example use: | someTimer.doPeriodically(0.5) cb -> | if i > 10 | destroy cb

function doPeriodically(real time, CallbackPeriodic cb) returns CallbackPeriodic

Source

Execute an action periodically. The callback has to be destroyed manually. Example use: | doPeriodically(0.5) cb -> | if i > 10 | destroy cb

function static timer.doPeriodicallyCounted(real time, int callAmount, CallbackCounted cb) returns CallbackCounted

Source

execute an action periodically, with a limited amount of calls The callback object is destroyed after the action has been executed callAmount times. Must be used on a timer acquired with `getTimer()` Example use: | someTimer.doPeriodicallyCounted(0.5, 100) cb -> | doSomething()

function doPeriodicallyCounted(real time, int callAmount, CallbackCounted cb) returns CallbackCounted

Source

execute an action periodically, with a limited amount of calls The callback object is destroyed after the action has been executed callAmount times. Example use: | doPeriodicallyCounted(0.5, 100) cb -> | doSomething()

function static timer.doPeriodicallyTimed(real interval, real timerDuration, CallbackCounted cb) returns CallbackCounted

Source

execute an action periodically, with a limited duration The callback object is destroyed afterwards. Must be used on a timer acquired with `getTimer()` Example use: | someTimer.doPeriodicallyCounted(0.5, 10.) -> | doSomething()

function doPeriodicallyTimed(real interval, real timerDuration, CallbackCounted cb) returns CallbackCounted

Source

execute an action periodically, with a limited duration The callback object is destroyed afterwards. Example use: | doPeriodicallyCounted(0.5, 10.) -> | doSomething()

function nullTimer(CallbackSingle cb) returns CallbackSingle

Source

Execute an action with a 0-second timer delay. The callback object is destroyed afterwards.

interface Callback

Source

function call()

Source

class CallbackCounted

Source

function call(CallbackCounted cb)

Source

function getCount() returns int

Source

function isLast() returns boolean

Source

function progress() returns real

Source

Returns a value between 0 and 1.

function start(timer whichTimer, real time, int callAmount)

Source

function stop()

Source

class CallbackPeriodic

Source

function call(CallbackPeriodic cb)

Source

function start(timer whichTimer, real time)

Source

class CallbackSingle

Source

function call()

Source

function getRemaining() returns real

Source

function start(timer whichTimer, real time)

Source