Jump to content

Is there a way to keep some objects beetween states?


thiezar
 Share

Recommended Posts

When you switch states, set the parameter that clears the world to FALSE, so the display list isn't changed at all. And then you'll have to clear away the things you don't need yourself, keeping the background going. Also the background object will either need creating outside of your state, or passed over as the state changes, so the reference isn't lost.

Link to comment
Share on other sites

  • 1 year later...

When you switch states, set the parameter that clears the world to FALSE, so the display list isn't changed at all. And then you'll have to clear away the things you don't need yourself, keeping the background going. Also the background object will either need creating outside of your state, or passed over as the state changes, so the reference isn't lost.

 

Hi Rich, so what is the point of having the second parameter to FALSE if you have to manually pass over the objects to the next state so that those objects can be re-added. I mean.. you are actually re adding the objects again in the second state, then what is the second parameter set to FALSE doing anyway ? I am changing it to True and False, and I see it keeps cleaning the screen... there is no difference.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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