//dodgeSkill private void refreshDodgeSkill(SkillUIData dt) { SkillItemUI skillUI = dodgeSkill.GetComponent <SkillItemUI>(); if (skillUI == null) { skillUI = dodgeSkill.AddComponent <SkillItemUI>(); } if (skillUI != null) { skillUI.setData(dt.getDodgeSkillData()); } }
//normalSkill private void refreshNormalSkill(SkillUIData dt) { List <SkillItemUIData> lst = dt.getNormalSkillData(); for (int i = 0; i < lst.Count; i++) { GameObject go = skillMap[i]; if (go == null) { break; } SkillItemUI item = go.GetComponent <SkillItemUI>(); if (item == null) { item = go.AddComponent <SkillItemUI>(); } if (item != null) { item.setData(lst[i]); } } }