For a part of the game I’m trying to make, there’s a phase where it’s some text shows up on the screen for a few seconds each time. So far I did it with a timer.performWithDelay.
But I also want another text object to show up after all of the items have been cycled through. However, if I just put in some code after the timer statement, it will immediately show up while the queued items are still running.
timer.performWithDelay( 1000, showNext, 5 )
– I want to wait until all the time-delayed calls are done somehow
transition.to( endText, { time=300, x = centerX, y = centerY } )
Is there a good way to make code after the performWithDelay run after all the pending showNexts have finished? I know you could use another performWithDelay statement after it, but wouldn’t that force every additional statement after it to have time delays?