Hi guys, I’m almost finishing my game and just noticed something annoying.
It’s a one scene game and it follows the flow:
“menu.lua --> level1.lua --> tryagain.lua --> level1.lua”
I read that from here (http://forums.coronalabs.com/topic/38414-how-to-reload-a-scene-and-proceed-like-normal/) and is suppossed to be the best way to reload a scene. Really my “tryagain.lua” is a scene with some buttons that let you go to the menu, and restart the game.
My game uses physics, and I noticed that the main character doesn’t starts as it should, it has a slightly rotation and that rotation is related with the collision of the previous level1.lua executed. Maybe something related with the physics??
The button to “tryagain.lua” does the following:
local handleAgain = function (event) composer.removeScene("level1") composer.gotoScene( "level1", { params = { mode = mode } }) return true end
Maybe there is not enough time to complete remove the scene?
Thanks a lot!!!
I just moved the composer.removeScene(“scene”) to the phase = did of the function scene:show( event ) and it worked fine, but the problem is that I need to keep the previous scene until the last moment because I need to take a screenshot of the previous scene if the user wants to share that, so I can remove it until I know the user is going to the menu or trying again.