Budda Posted September 13, 2015 Share Posted September 13, 2015 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 More sharing options...
rich Posted September 13, 2015 Share Posted September 13, 2015 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. Budda 1 Link to comment Share on other sites More sharing options...
Budda Posted September 13, 2015 Author Share Posted September 13, 2015 Just got to page 75 and found the answer was in the mystery boolean flag to be discussed later. So yes 'clearWorld' does the magic. Link to comment Share on other sites More sharing options...
Recommended Posts