Difference between revisions of "Timer.delayedCall"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 8: Line 8:
 
[[Special:MyLanguage/Timer|Timer]] object created inside.<br />
 
[[Special:MyLanguage/Timer|Timer]] object created inside.<br />
 
<br /></translate>
 
<br /></translate>
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(Timer) = Timer.delayedCall(delay,func,data)
 
(Timer) = Timer.delayedCall(delay,func,data)
 
</source>
 
</source>

Revision as of 15:31, 13 July 2023


Available since: Gideros 2011.6
Class: Timer

Description


Provides a simple way to call a function after a set amount of time. This function returns the
Timer object created inside.

<syntaxhighlight lang="lua"> (Timer) = Timer.delayedCall(delay,func,data) </source>

Parameters

delay: (number) Delay in miliseconds before the function is called
func: (function) Function to call
data: (any) An optional data parameter that is passed as a first argument to the function optional

Return values

Returns (Timer) The Timer object