Esempio n. 1
0
        private FlowEnemyData Parse(object value, string uid)
        {
            if (value == null)
            {
                return(null);
            }

            long          Uid  = EB.Dot.Long("guid", value, 0);
            FlowEnemyData item = Find(uid) ?? new FlowEnemyData();//预赛敌人读取数据

            item.Uid   = EB.Dot.String("guid", value, item.Uid);
            item.TUid  = EB.Dot.String("uid", value, item.TUid);
            item.Score = EB.Dot.Integer("point", value, item.Score);
            string IconID = EB.Dot.String("charId", value, "10010");

            IconID = (IconID == "") ? "10010" : IconID;
            int skin = EB.Dot.Integer("skin", value, 0);

            Hotfix_LT.Data.HeroInfoTemplate heroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(IconID, skin);
            item.IconName   = (heroInfo != null) ? heroInfo.icon : "Partner_Head_Sugeladi";
            item.Name       = EB.Localizer.GetString(EB.Dot.String("name", value, item.Name));
            item.IsFightOut = EB.Dot.Bool("dead", value, false);
            string frameStr = EB.Dot.String("headFrame", value, null);

            item.FrameName = EconemyTemplateManager.Instance.GetHeadFrame(frameStr).iconId;
            return(item);
        }
Esempio n. 2
0
        public void Fill(FlowEnemyData data)
        {
            m_Data = data;
            if (m_Data != null)
            {
                PlayerIcon.spriteName = m_Data.IconName;
                FrameIcon.spriteName  = m_Data.FrameName;
                SetFlag(m_Data.Score);
                FightOutObj.CustomSetActive(m_Data.IsFightOut);

                FxObj.CustomSetActive(!m_Data.IsFightOut);

                mDMono.gameObject.CustomSetActive(true);
                PointLabel.text = string.Format(EB.Localizer.GetString("ID_codefont_in_FlowEnemyHud_2368"), data.Score);
            }
            else
            {
                mDMono.gameObject.CustomSetActive(false);
            }
        }
Esempio n. 3
0
 public void Clear()
 {
     m_Data = null;
     Fill(m_Data);
 }
Esempio n. 4
0
        public FlowEnemyData Find(string uid)
        {
            FlowEnemyData item = FlowEnemyDataList.Where(m => m.Uid == uid).FirstOrDefault();

            return(item);
        }