Jump to content

Help with keeping data between state changes


TimTation
 Share

Recommended Posts

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

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...