ptotheaul Posted November 17, 2017 Share Posted November 17, 2017 I want to remove all of the sprites and groups from and reset the variable of a State. So I go from the 'Game' state to a 'Gameover' state/screen. When go back to the 'Game' state I want to totally start over. Is there a way to do this? Link to comment Share on other sites More sharing options...
gauravD Posted December 1, 2017 Share Posted December 1, 2017 You can reset all your variables in the state's shutdown() and then call game.state.restart() (saves you the trip to Gameover too :)). Link to comment Share on other sites More sharing options...
Recommended Posts