ZTimer

From Wherigo Foundation Wiki
Revision as of 13:24, 22 April 2018 by Ranger Fox (Talk | contribs) (Created page with "Represents a instance of a ZTimer object. Inherits from ZObject. == Properties == {| class="wikitable" |Duration||Number||Number of seconds until the timer expires. |- |...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Represents a instance of a ZTimer object. Inherits from ZObject.


Properties

Duration Number Number of seconds until the timer expires.
Remaining Number Number of seconds until the timer expires.
Running Boolean If the timer is running or not.
StartTime Time Time when the timer has started.
Type String Type of the timer. Could be "Interval" or "Countdown".


Events

OnStart Fires when timer is started.
OnStop Fires when timer is stopped.
OnTick Fires when timer is expires.


Methods

Start(ZTimer self) Starts the timer.
Stop(ZTimer self) Stops the timer.


Constructor

ZTimer Wherigo.ZTimer(ZCartridge cartridge) Returns a new instance of object ZTimer. The only parameter is a instance of ZCartridge.
ZTimer Wherigo.ZTimer({parameters}) Parameter is a table with default entries. It is possible to set the following properties: Duration, Type. Additionally all parameters, which are valid for ZObject constructor.