how to restart a stage

hi,
if i’m using an app with multiple classes, and multiple event listeners .
and the code really is to complicated for me to go through every single event listener and veriable and zero it to it’s original state.

how can i simply restart the whole App ?

thaks in edvance !
[import]uid: 174056 topic_id: 35388 reply_id: 335388[/import]

I ran into this problem with my game VR Dash.

Basically I ended up making a landing scene that has a 1.5 second delay. In the enter scene event for the landing scene I have the following:

[lua] storyboard.removeAll() – Reset scenes + free up memory
timer.performWithDelay( 1, function() collectgarbage( “collect”) end) – Explicit call to collectgarbage, make sure the scene(s) get cleaned up [/lua]

You can call it loading and add a cool little animation to it, or you can use it a point to have the user select something (like difficulty).

There may be a better solution without leaving the scene, but I don’t know of one. There have been other threads discussing the problem, I would do a quick search. [import]uid: 181948 topic_id: 35388 reply_id: 140649[/import]

treb.stewart, thats a good idea. [import]uid: 119483 topic_id: 35388 reply_id: 140657[/import]

I ran into this problem with my game VR Dash.

Basically I ended up making a landing scene that has a 1.5 second delay. In the enter scene event for the landing scene I have the following:

[lua] storyboard.removeAll() – Reset scenes + free up memory
timer.performWithDelay( 1, function() collectgarbage( “collect”) end) – Explicit call to collectgarbage, make sure the scene(s) get cleaned up [/lua]

You can call it loading and add a cool little animation to it, or you can use it a point to have the user select something (like difficulty).

There may be a better solution without leaving the scene, but I don’t know of one. There have been other threads discussing the problem, I would do a quick search. [import]uid: 181948 topic_id: 35388 reply_id: 140649[/import]

treb.stewart, thats a good idea. [import]uid: 119483 topic_id: 35388 reply_id: 140657[/import]