示例#1
0
 private void InitSkillListPanel()
 {
     for (int i = 0; i < skillListPanel.Count; i++)
     {
         DragAndDropItem_Training myitem = skillListPanel[i].GetComponentInChildren <DragAndDropItem_Training>();
         int skillRequireLevel           = skillDB.GetSkillPrefab()[i].GetComponent <SkillBase>().GetRequiredLevel();
         if (skillRequireLevel <= (PlayManage.Instance.GetPlayerLevel()))
         {
             myitem.gameObject.GetComponent <Image>().sprite = skillDB.GetSkillIcon(i);
             myitem.IndexNum = (i);
             myitem.SetItemCanDrag(true);
         }
         else
         {
             myitem.gameObject.GetComponent <Image>().sprite = GetPadLock();
             myitem.SetItemCanDrag(false);
             ShowRequiredLevel(skillRequireLevel, myitem.transform);
         }
     }
 }
示例#2
0
    private IEnumerator InitSkillPanel()
    {
        yield return(new WaitForFixedUpdate());

        for (int i = 0; i < preSetList.Count; i++)
        {
            int index = preSetList[i];
            SkillPanelList[i].SetInstance(index, SkillDB.GetSkillCoolTime(index), SkillDB.GetSkillIcon(index));
            StartCoroutine(SkillPanelList[i].SkillDelay());
        }
    }