public void RestartGame(bool start) { if (gamePaused) { if (OnPauseGame != null) { OnPauseGame(false); } GameOver(GameOverType.Quit, false); } dataManager.ResetValues(); infiniteObjectGenerator.ResetValues(); powerUpManager.ResetValues(); playerController.ResetValues(false); cameraController.ResetValues(); if (chaseController != null) { chaseController.Reset(false); } if (showTutorial) { infiniteObjectGenerator.ShowStartupObjects(true); } else { // show the startup objects if there are any if (!infiniteObjectGenerator.ShowStartupObjects(false)) { infiniteObjectGenerator.SpawnObjectRun(false); } } infiniteObjectGenerator.ReadyFromReset(); if (start) { StartGame(true); } }