Jump to content

States overlaying states


Budda
 Share

Recommended Posts

Having read through the excellent StateManager guide in the first issue of Interphase magazine I was left with a few questions in my head.

 

It's suggested a whole state might be used to represent an in-game weapon/item shop. If this was done is there a way to have one state open up on top of the previous running state to maintain the background in some way? Just thinking that weapon shops often open as an overlay on a game (can't think of examples in my head of hand right now)

 

If not - is grabbing the canvas buffer before switch states a better way to use as a background for the new state ?

Link to comment
Share on other sites

When I wrote that I did mean as a separate screen, not a modal. If you set clearWorld to false then it allows you to add more objects onto the display list, which would appear over the top of your game. That might be worth trying - but you'll have to make sure your game state can cleanly exit and resume without recreating loads of objects again, which can be a bit fiddly.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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