// Start is called before the first frame update void Start() { _restartButton.onClick.AddListener(OnRestartClicked); ScoreSaving.Load(); peopleHousedText.text = ScoreSaving.nbHoused + " Highest " + ScoreSaving.maxNbHoused; reviewRatingText.text = ScoreSaving.rating.ToString("N1") + " Highest " + ScoreSaving.maxRating; }
private void Start() { scoreScript = GameObject.Find("Scenario2ScoreSaver").GetComponent <ScoreSaving>(); if (!scoreScript.round) { round1Score = scoreScript.round1Scores; PlayerPrefs.SetFloat("savingRound1", round1Score); scoreScript.round = true; } if (scoreScript.round) { round2Score = scoreScript.round2Scores; } }
private void EndGame() { _enableInteractions = false; ScoreSaving.SetScore(_nbPeopleHoused, _reviewRating); SceneManager.LoadScene("WinScreen"); }