Difference between revisions of "Timer.delayedCall"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
<br />
+
<translate><br />
 
Provides a simple way to call a function after a set amount of time. This function returns the<br />
 
Provides a simple way to call a function after a set amount of time. This function returns the<br />
`Timer` object created inside.<br />
+
[[[Timer]]] object created inside.<br />
<br />
+
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
(Timer) = Timer.delayedCall(delay,func,data)
 
(Timer) = Timer.delayedCall(delay,func,data)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''delay''': (number) Delay in miliseconds before the function is called <br/>
+
'''delay''': (number) <translate>Delay in miliseconds before the function is called</translate> <br/>
'''func''': (function) Function to call <br/>
+
'''func''': (function) <translate>Function to call</translate> <br/>
'''data''': (any) An optional data parameter that is passed as a first argument to the function '''optional'''<br/>
+
'''data''': (any) <translate>An optional data parameter that is passed as a first argument to the function</translate> '''optional'''<br/>
 
=== Return values ===
 
=== Return values ===
'''Returns''' (Timer) The `Timer` object<br/>
+
'''Returns''' (Timer) <translate>The [[[Timer]]] object</translate><br/>

Revision as of 13:34, 23 August 2018

Available since: Gideros 2011.6

Description


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

(Timer) = Timer.delayedCall(delay,func,data)

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