Exemplo n.º 1
0
 void Start()
 {
     totalSkillPoints  = -1;
     welshSkillsListUI = GetPanel().transform.Find("WelshSkillsListUI").GetComponent <WelshSkillsListUI>();
     //print(welshSkillsListUI);
     totalSkillPoints = GetTotalSkillPoints();
 }
        public void InitialiseMe(string english, string welsh, string tally, int tallyMod, bool skillInc, DialogueTestDataController.TestType testType)
        {
            base.InitialiseMe(english, welsh);
            welshSkillListUI = FindObjectOfType <WelshSkillsListUI>();
            print("WELSH SKILLS LIST UI: " + welshSkillListUI);
            extraInfo         = transform.Find("ExtraInformation");
            progressSlider    = extraInfo.Find("ProgressSlider").GetComponent <Slider>();
            progressLbl       = extraInfo.Find("ProgressLbl").GetComponent <Text>();
            tallyModifier     = extraInfo.Find("TallyModifier").GetComponent <Text>();
            skillsIncrementer = extraInfo.Find("SkillPointIncrementer").GetComponent <Text>();
            int    tallyInt = int.Parse(tally);
            int    threshold;
            string proficiencyString;

            SetProficiencyDetailsFromTally(tallyInt, english, welsh, out proficiencyString, out threshold, testType);
            progressSlider.maxValue = threshold;
            progressSlider.value    = tallyInt;
            progressLbl.text        = proficiencyString;
            SetTallyModifier(tallyMod);
            SetSkillsIncrementer(skillInc);
        }