예제 #1
0
    //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());
        }
    }
예제 #2
0
    //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]);
            }
        }
    }