Hey Corona Community,
Working on a game that has multiple objects (using the DMC Drag & Drop OOP code) and each of them uses a seperate timer to count down individual scores.
function DropTarget:runTimer()
local listener = function() self:objectTimer() end
self.background:prepare("running")
self.background:play()
timer.performWithDelay(33, listener, 1000)
end
This is called every time a new object is created, which happens quite a bit in the later levels. I’m not sure how to handle pausing and resuming all these timers. Should I be labeling them and/or throwing them into a table? I’ve found a few different ways of pausing and resuming, but none seem to handle object oriented code very efficiently.
Looking for any advice on how to move forward. Thanks! [import]uid: 115606 topic_id: 21161 reply_id: 321161[/import]