I have a game with levels and want to be able to pause the game, hit the restart level button and have it reload all of my objects as if it was loaded from the level select menu. I’ve done some research on how other people do it and tried a couple of ways.
I tried inserting a loading screen in between and the loading screen has nothing in it but a delay timer and then the director call to the gameScreen. This method was discussed here.
This method resulted in our backgrounds (parallax) getting loaded, but not the other objects.
I also tried to just reload all the variables with the method mentioned here but that doesn’t work either.
When I tried to reload the variables it was as if initVar() was being called twice because there would be twice as many objects.
Does anyone have any example code or advice on how you have reloaded your levels? Any assistance would be greatly appreciated. Thank you!
EDIT: I forgot to mention that we are using a database that does exactly what is mentioned here as well. [import]uid: 39480 topic_id: 8776 reply_id: 308776[/import]