public void GameOver() { State = GameState.GameOver; PanelGameOver.Play("Open"); PanelGamePlay.Play("Close"); ScoreGame.text = Mathf.Round(Score).ToString(); foreach (Transform t in ObstacleParent) { Destroy(t.gameObject); } UpdateHigthScore(); }
public void Home() { PanelGameOver.Play("Close"); PanelMainMenu.Play("Open"); SceneManager.LoadScene(0); }