How to delay the next step? For example:
Print (“1”)
- how to delay 3 seconds and then do the next step
Print (“2”)
How to delay the next step? For example:
Print (“1”)
Print (“2”)
You can use timers for this:
https://docs.coronalabs.com/api/library/timer/performWithDelay.html
print(1) timer.performWithDelay(3000, function() print(2) end)
I would like to ask this example, I would like to ask, for example, I want to do this operation,
Print (1)
Delay 2000ms
Print (2)
Delay 2000ms
Print (3)
Delay 2000ms
.
.
.
Print (n)
Delay 2000ms
If you use the above demo, you want to cover a lot of layers, there is no simple way to do?
print(1) timer.performWithDelay(2000, function(event) print(event.count+1) end,n-1) // if n\>1 of course !
You can use timers for this:
https://docs.coronalabs.com/api/library/timer/performWithDelay.html
print(1) timer.performWithDelay(3000, function() print(2) end)
I would like to ask this example, I would like to ask, for example, I want to do this operation,
Print (1)
Delay 2000ms
Print (2)
Delay 2000ms
Print (3)
Delay 2000ms
.
.
.
Print (n)
Delay 2000ms
If you use the above demo, you want to cover a lot of layers, there is no simple way to do?
print(1) timer.performWithDelay(2000, function(event) print(event.count+1) end,n-1) // if n\>1 of course !