Exemple #1
0
 void Awake()
 {
     hiscores.LoadHiscores();
     score1.text = "#1 : " + hiscores.GetHiscores()[0];
     score2.text = "#2 : " + hiscores.GetHiscores()[1];
     score3.text = "#3 : " + hiscores.GetHiscores()[2];
     score4.text = "#4 : " + hiscores.GetHiscores()[3];
     score5.text = "#5 : " + hiscores.GetHiscores()[4];
 }
    // Start is called before the first frame update
    void Start()
    {
        Hiscores hiscores = new Hiscores();

        hiscores.LoadHiscores();
        int highestScore = hiscores.GetHiscores()[0];

        for (int i = 0; i < equipButtons.Length; i++)
        {
            if (scoreRequirements[i] > highestScore) //highest hiscore isn't high enough
            {
                equipButtons[i].interactable = false;
            }
            else //highest hiscore is high enough
            {
                equipButtons[i].interactable = true;
            }
        }
    }
Exemple #3
0
 // Start is called before the first frame update
 void Start()
 {
     score = 0;
     hiscores.LoadHiscores();
 }