Is there an easy way to cancel all timers at once? [import]uid: 8556 topic_id: 2066 reply_id: 302066[/import]
With one call to Corona? No. [import]uid: 5712 topic_id: 2066 reply_id: 6045[/import]
Ok, no problem about that, but is there a way to get the ids of the running timers?
I want something like this:
while (timer.numChildren > 0) do
timer.cancel( timer.numChildren )
end [import]uid: 8556 topic_id: 2066 reply_id: 6048[/import]
There is no list of running timers but you could make your own table of active timers in Lua.
-Tom [import]uid: 7559 topic_id: 2066 reply_id: 6120[/import]
In the BeebeGames Class Version 1.3, if you use my replacement to timer.performWithDelay(), which is performAfterDelay(), you’ll have a list of all active timers, and also be able to pause, resume, and cancel all active timers with one simple call.
Timers created with performAfterDelay() have the same capabilities as timer.performWithDelay(), but are able to be paused and resumed easily as well.
More info here:
http://jonbeebe.tumblr.com/post/2439016279/how-to-use-the-new-time-functions
You can download the module here:
http://developer.anscamobile.com/code/beebegames-class [import]uid: 7849 topic_id: 2066 reply_id: 14814[/import]