/// <summary>
        /// 更新我获取的卡牌的状态
        /// </summary>
        public void UpdateAllHeroInfo()
        {
            UIAllHeroInfoTransfer t = new UIAllHeroInfoTransfer();

            for (int i = 0; i < Global.HeroInfoList.Count; i++)
            {
                HeroInfo info = Global.HeroInfoList[i];
                if (info == null)
                {
                    Debug.LogError("错啦,全错啦,菜逼!");
                    return;
                }
                UIAllHeroInfoTransfer.UIHeroInfo uinfo = PrepareUIHeroInfo(info);
                long roleId = Global.FightHeroList.Find(x => x == Global.HeroInfoList[i].RoleId);
                if (roleId != 0)
                {
                    uinfo.IsFight = true;
                }
                else
                {
                    uinfo.IsFight = false;
                }
                //配置拥有的所有英雄
                t.HeroInfoList.Add(uinfo);
            }
            ((UIGameSceneView)UISceneCtrl.Instance.CurrentUIScene).SetUI(t);
        }
 public void ShowDragHeroItem(int heroId)
 {
     if (m_DragHeroView == null)
     {
         GameObject DragHeroItem = ResourcesMrg.Instance.Load(ResourcesMrg.ResourceType.UIWindowChild, "DragHeroItem");
         DragHeroItem.transform.SetParent(UISceneCtrl.Instance.CurrentUIScene.MainCanvans.transform);
         DragHeroItem.transform.localScale = Vector3.one;
         m_DragHeroView = DragHeroItem.GetComponent <UIDragHeroView>();
         HeroInfo info = Global.HeroInfoList.Find(x => x.HeroID == heroId);
         if (info == null)
         {
             Debug.LogError("错啦,全错啦,菜逼!");
             return;
         }
         UIAllHeroInfoTransfer.UIHeroInfo uinfo = PrepareUIHeroInfo(info);
         m_DragHeroView.SetUI(uinfo.HeroIcon, uinfo.AttackArea, uinfo.AttackRange, uinfo.JobIcon, uinfo.HeroName);
     }
     m_DragHeroView.gameObject.SetActive(true);
 }
        private UIAllHeroInfoTransfer.UIHeroInfo PrepareUIHeroInfo(HeroInfo info)
        {
            UIAllHeroInfoTransfer.UIHeroInfo uinfo = new UIAllHeroInfoTransfer.UIHeroInfo();

            uinfo.RoleId = info.RoleId;
            uinfo.HeroId = info.HeroID;
            HeroEntity heroEntity = HeroDBModel.Instance.Get(uinfo.HeroId);

            uinfo.HeroIcon = heroEntity.HeadPic;
            uinfo.HeroName = heroEntity.Name;
            SkillEntity skillEntity = SkillDBModel.Instance.Get(info.SkillList[0].SkillId);

            uinfo.AttackArea  = skillEntity.AttackArea;
            uinfo.AttackRange = skillEntity.AttackRange;
            JobEntity jobEntity = JobDBModel.Instance.Get(heroEntity.Job);

            uinfo.JobIcon = jobEntity.Icon;

            return(uinfo);
        }