def switchToMainMenu(self): # Pause all things GlobalServices.getAudioDevice().stopAll() # Close and delete the temporary shelf reset_savegame() # Delete the Map cache as well MapFactory.clearMaps() # Change state self.state = STATE_MAIN_MENU self.evManager.post(GameStateChangedEvent(self.state))