public void SetupView(List <EquipSkillDataItem> skills, int equipLevel = 1) { this._skills = skills; if (this._skills != null) { for (int i = 0; i < base.transform.childCount; i++) { Transform transform = base.transform.Find("Skill_" + i); if (transform != null) { if (i < skills.Count) { transform.gameObject.SetActive(true); EquipSkillDataItem item = skills[i]; transform.Find("Name").GetComponent <Text>().text = item.skillName; transform.Find("Desc").GetComponent <Text>().text = item.GetSkillDisplay(equipLevel); } else { transform.gameObject.SetActive(false); } } } } }
private void UpdateSkillContent(Transform trans, EquipSkillDataItem skillData) { trans.Find("Label").GetComponent<Text>().text = skillData.skillName; trans.Find("Desc").GetComponent<Text>().text = skillData.GetSkillDisplay(this.itemDataBefore.level); }