Beispiel #1
0
 private void SetUnitInfo(UnitGroup unitGroup, int num)
 {
     units[num].SetActive(true);
     units[num].transform.GetChild(0).GetComponent <Text>().text    = unitGroup.UnitName;
     units[num].transform.GetChild(1).GetComponent <Text>().text    = unitGroup.Progress.ToString();
     units[num].transform.GetChild(2).GetComponent <Text>().text    = unitGroup.NextLevel().ToString();
     units[num].transform.GetChild(3).GetComponent <Slider>().value = unitGroup.Progress * 100 / unitGroup.NextLevel();
 }