void Finish() { DestroyAll(); pres_r.SetActive(true); Time.timeScale = 0; if (HighScore2.score > HighScore2.highscore) { HighScore2.highscore = HighScore2.score; } HighScore2.Reset(); }
void Finish() { DestroyAll(); pres_r.SetActive(true); if (HighScore.score > HighScore.highscore) { HighScore.highscore = HighScore.score; } HighScore.Reset(); HighScore2.Reset(); }
private IEnumerator showScores() { Debug.Log("showScores"); for (int i = (highScores2.Count - 1); i >= 0; i--) { Debug.Log("showScores set values" + i); GameObject scoreObj = Instantiate(scorePrefab); HighScore2 tmpScore = highScores2[i]; scoreObj.GetComponent <ScoreBoard>().SetScore("#" + (highScores2.Count - i).ToString(), tmpScore.Name, tmpScore.Score.ToString()); scoreObj.transform.SetParent(scoreParent); scoreObj.GetComponent <RectTransform>().localScale = new Vector3(1, 1, 1); } yield return(null); }