In my game, when you click the character the board gets overlayed with the spaces he’s able to move to. When you click one of those spaces, I move him there using transition.to() and then clear the overlay using object:removeSelf()
When I run the code, the character slides nicely to his new spot, but the overlay doesn’t clear. It’s not until I click the character again (to select him in preparation for another move) that the overlay goes away.
I know that in Corona the screen is not drawn until all the code has finished running, and if I comment out the transition.to() call then the overlay clears immediately after clicking the new location. But even if the screen doesn’t update before the transition animation begins, shouldn’t it at least update once it’s done?
That said, what’s the best way around this? Using the onStart or onComplete callback in the transition seems clunky. Using coroutines seems like overkill. I simply want to clear the overlay, and then begin the transition. [import]uid: 42158 topic_id: 29104 reply_id: 329104[/import]