// 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;
 }
예제 #2
0
 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;
     }
 }
예제 #3
0
 private void EndGame()
 {
     _enableInteractions = false;
     ScoreSaving.SetScore(_nbPeopleHoused, _reviewRating);
     SceneManager.LoadScene("WinScreen");
 }