TimTation Posted August 25, 2014 Share Posted August 25, 2014 Hello all! I am still pluging away at my incremental/idle game and needed a bit more help.I am wondering if there is a way to keep the content in a state stay after switching to another state.I have some variables etc on screen in one state and would like to have them keep there values/stay on screen after going to another state and returning to said state. Thanks in advance! -TimTation Link to comment Share on other sites More sharing options...
spencerTL Posted August 25, 2014 Share Posted August 25, 2014 In the Phaser templates look at the boot.js state. It shows you there. Something along the lines of BasicGame.score:22.I’m on a phone at the moment which makes it difficult to check\link to it you should be able to find it easily enough. jzcoder 1 Link to comment Share on other sites More sharing options...
Chendler Posted August 26, 2014 Share Posted August 26, 2014 Hello all! I am still pluging away at my incremental/idle game and needed a bit more help.I am wondering if there is a way to keep the content in a state stay after switching to another state.I have some variables etc on screen in one state and would like to have them keep there values/stay on screen after going to another state and returning to said state. Thanks in advance! -TimTation You can to try the next method http://www.html5gamedevs.com/topic/8677-levels-management-with-states/#entry52133 But if you want to make 'menu' state, you have to save a lot of information. I have similar situation now - http://www.html5gamedevs.com/topic/8796-pause-menu/ Link to comment Share on other sites More sharing options...
TimTation Posted August 26, 2014 Author Share Posted August 26, 2014 Thank you both for your help!I'll try the tips you gave me and see what comes of it...once again thanks! Link to comment Share on other sites More sharing options...
Recommended Posts