@ar2rsawseen Oh ok, why did you delete the crate example where they just fall down? Is there any way we can download that template again? ">
I'm asking because I wanted to test the transition from clearing a level to the next one. I am mainly trying to see how unlocking levels/packs work, in order to implement something similar on my game.
How can I pause the game (level.lua), go to another scene and come back to the same scene with the game still paused and all the level values as they were before pausing? (If this post needs to be on another thread please let me know).
I'm trying to think of a way to do it. If I stay on level.lua class, I'm guessing it's easy to stop the timers and block or remove some of the events (like Event.ENTER_FRAME) while the game is paused.
But I want to pause the game, change scene and then go back to the paused game. I'm confused cause on the changeScene function on scenemanager.lua, a new object of the new scene is always created.
Comments
I'm asking because I wanted to test the transition from clearing a level to the next one. I am mainly trying to see how unlocking levels/packs work, in order to implement something similar on my game.
In most cases, you can take any box2d example and copy contents in the level scene:
http://appcodingeasy.com/search?cx=partner-pub-9788262504075456:9299277522&cof=FORID:10&ie=UTF-8&q=box2d&sa.x=0&sa.y=0
This code was needed on main.lua to solve the issue
Likes: ar2rsawseen
I'm trying to think of a way to do it. If I stay on level.lua class, I'm guessing it's easy to stop the timers and block or remove some of the events (like Event.ENTER_FRAME) while the game is paused.
But I want to pause the game, change scene and then go back to the paused game. I'm confused cause on the changeScene function on scenemanager.lua, a new object of the new scene is always created.
Then you need to enable ignoring touch and mouse events, like this: