Пример #1
0
    /// <summary>
    ///  第一个参数传入技能字典,第二个参数表示是否会跳出来让玩家检测,第三个参数表示是否和现在已添加的技能共存,该方法用于添加同名卡牌到手牌。
    /// </summary>
    /// <param name="SkillIdWithHanderDic"></param>
    /// <param name="SkillCardCountDic"></param>
    /// 表示添加技能卡牌到手牌数量的字典。
    /// <param name="mustCheck"></param>
    /// <param name="isCoexist"></param>
    public void UpdataAndShowSkillUsePanel(Dictionary <int, Dictionary <string, EventDelegate> > SkillIdWithHanderDic, Dictionary <int, int> SkillCardCountDic, bool mustCheck = false, bool isCoexist = false)
    {
        List <Skill> skillList = new List <Skill>();

        GUIManager.ShowView("SkillUsePanel");
        if (SkillIdWithHanderDic == null || SkillIdWithHanderDic.Count <= 0)
        {
            SkillUsePanel.UpdataUseSkill(null);
            return;
        }

        foreach (KeyValuePair <int, Dictionary <string, EventDelegate> > item in SkillIdWithHanderDic)
        {
            Skill skill = null;
            int   count = 0;
            if (!SkillDic.TryGetValue(item.Key, out skill))
            {
                Debug.LogError("not has this skill" + "__" + item.Key);
            }
            if (!SkillCardCountDic.TryGetValue(item.Key, out count))
            {
                Debug.LogError("not has this skillCount" + "__" + item.Key);
            }

            if (skill != null)
            {
                skill.TargetWithHanderDic = item.Value;
                for (int i = 0; i < count; i++)
                {
                    skillList.Add(skill);
                }
            }
        }
        SkillUsePanel.UpdataUseSkill(skillList, mustCheck, isCoexist);
    }
Пример #2
0
 public void ClearSkillUsePanel()
 {
     SkillUsePanel.ClearAllSkillList();
     SkillUsePanel.UpdataUseSkill(null);
 }