Difference between revisions of "Timer"
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2011.6<br/> === Description === <br /> The `Timer` class is used to execute a code at specified inter...") |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Supported platforms:''' <br/> | + | '''Supported platforms:''' android, ios, mac, pc<br/> |
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
=== Description === | === Description === | ||
<br /> | <br /> | ||
The `Timer` class is used to execute a code at specified intervals. The listener functions are registered<br /> | The `Timer` class is used to execute a code at specified intervals. The listener functions are registered<br /> | ||
− | through `Event.TIMER` and `Event.TIMER_COMPLETE` events.<br />{|- | + | through `Event.TIMER` and `Event.TIMER_COMPLETE` events.<br /> |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | {|- | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Methods === | === Methods === | ||
+ | [[Timer.delayedCall]] - delayed call a function after a set amount of time<br/> | ||
+ | [[Timer.new]] - creates a new Timer object<br/> | ||
+ | [[Timer.pauseAll]] - pause all timers<br/> | ||
+ | [[Timer.resumeAll]] - resume all timers<br/> | ||
+ | [[Timer.stopAll]] - stop all timers<br/> | ||
+ | [[Timer:getCurrentCount]] - returns the current trigger count of the timer<br/> | ||
+ | [[Timer:getDelay]] - returns the time interval between timer events in milliseconds<br/> | ||
+ | [[Timer:getRepeatCount]] - returns the number of repetitions the timer will make<br/> | ||
+ | [[Timer:isRunning]] - returns the current running status of timer<br/> | ||
+ | [[Timer:reset]] - stops the timer and sets the currentCount property to 0<br/> | ||
+ | [[Timer:setDelay]] - sets the time interval between timer events in milliseconds<br/> | ||
+ | [[Timer:setRepeatCount]] - sets the number of repetitions the timer will make<br/> | ||
+ | [[Timer:start]] - starts the timer<br/> | ||
+ | [[Timer:stop]] - stops the timer<br/> | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Events === | === Events === | ||
+ | [[Event.TIMER]] | ||
+ | [[Event.TIMER_COMPLETE]] | ||
=== Constants === | === Constants === | ||
|} | |} |
Revision as of 08:57, 23 August 2018
Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6
Description
The `Timer` class is used to execute a code at specified intervals. The listener functions are registered
through `Event.TIMER` and `Event.TIMER_COMPLETE` events.
MethodsTimer.delayedCall - delayed call a function after a set amount of time |
EventsEvent.TIMER Event.TIMER_COMPLETE Constants |