casherwest Posted September 26, 2014 Share Posted September 26, 2014 Hi all, I have multiple states in my game. Switching between states should destroy all objects. But if I start a sound in one state and switch to the next, the sound still plays. It shouldn't be the case or? Link to comment Share on other sites More sharing options...
lewster32 Posted September 26, 2014 Share Posted September 26, 2014 Switching states will only reliably clear the display list - sounds will continue playing, and any objects added to the state as properties will still be attached. This is why states are given a shutDown function which is called upon closing the state, where you can clean up after yourself. Link to comment Share on other sites More sharing options...
Recommended Posts