public void GameOver() { CurrentGameState = GameState.GameOver; GameOverPanel.SetActive(true); obstacleController.ClearAllObstacle(); obstacleController.LoadNextObstacle(); obstacleController.StartGame(); // obstacleController.StartGame(); Time.timeScale = 0; playerController.SwitchControlPlayer(false); StartCoroutine(RestartGame()); }