コード例 #1
0
        public override void Fill(LTShowItemData itemData)
        {
            //EB.Debug.Log(mDMono.transform.name + ".say: Item Fill!");

            if (itemData == null)
            {
                EB.Debug.LogWarning(mDMono.transform.name + ".say: item data is null!");
                mDMono.gameObject.CustomSetActive(false);
                return;
            }
            else
            {
                //EB.Debug.Log(mDMono.transform.name + ".say: id = " + itemData.id);
                mData = new LTShowItemData(itemData.id, itemData.count, itemData.type, false);
                mDMono.gameObject.CustomSetActive(true);
            }
            m_Item.mDMono.gameObject.CustomSetActive(!LTGetItemUIController.m_isHC);
            m_NewItem.mDMono.gameObject.CustomSetActive(LTGetItemUIController.m_isHC);

            if (LTGetItemUIController.m_isHC)
            {
                int cid = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(mData.id).character_id;
                Hotfix_LT.Data.HeroInfoTemplate temp = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(cid);
                m_NewItem.Fill(temp);
            }
            else
            {
                m_Item.LTItemData = new LTShowItemData(itemData.id, itemData.count, itemData.type, false);
            }
        }
コード例 #2
0
 public void SetAwardInfo()
 {
     string str = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("WelfareGrowUpAward");
     if (str != null)
     {
         LTShowItemData itemData = GetItemData(str);
         if (itemData != null)
         {
             if (itemData.type == LTShowItemType.TYPE_HEROSHARD|| itemData.type == LTShowItemType.TYPE_HERO)
             {
                 id = itemData.id;
                 int cid = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(itemData.id).character_id;
                 Hotfix_LT.Data.HeroInfoTemplate data = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(cid);
                 MainIcon.spriteName = data.icon;
                 RoleIcon.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[data.char_type]; 
                 HotfixCreateFX.ShowCharTypeFX(charFx, efClip, RoleIcon.transform, (PartnerGrade)data.role_grade, data.char_type);
                 GradeIcon.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[(PartnerGrade)data.role_grade];
                 HeroItem.CustomSetActive(true);
             }
             else
             {
                 ShowItem.LTItemData = itemData;
                 ShowItem.mDMono.gameObject.CustomSetActive(true);
             }
         }
     }
 }
コード例 #3
0
        /// <summary>
        /// 设置数据
        /// </summary>
        /// <param name="data">数据</param>
        private void SetBoss(Hotfix_LT.Data.AllianceFBBoss data)
        {
            //
            Hotfix_LT.Data.MonsterInfoTemplate monsterTpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetMonsterInfo(data.monsterId);
            if (monsterTpl == null)
            {
                EB.Debug.LogError("LTLegionFBHudController InitBoss, monsterTpl is Error monsterID = {0}", data.monsterId);
                return;
            }

            Hotfix_LT.Data.HeroInfoTemplate info = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(monsterTpl.character_id);
            if (info == null)
            {
                EB.Debug.LogError("LTLegionFBHudController InitBoss, info is Error monsterTpl.character_id = {0}", monsterTpl.character_id);
                return;
            }

            if (mDMono.gameObject.activeInHierarchy)
            {
                StartCoroutine(CreateBossModel(info.model_name));
            }
            LTUIUtil.SetText(v_MonsterName, info.name);
            //
            SetReward(data.Rewards);
        }
コード例 #4
0
        private void UpdateItem()
        {
            if (m_data == null || m_data.id == 0)
            {
                mDMono.transform.gameObject.CustomSetActive(false);
                return;
            }
            mDMono.transform.gameObject.CustomSetActive(true);
            Hotfix_LT.Data.HeroInfoTemplate info = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(m_data.character_id);
            IconSprite.spriteName = info.icon;

            int quality  = 0;
            int addLevel = 0;

            LTPartnerDataManager.GetPartnerQuality(m_data.upgrade, out quality, out addLevel);

            FrameSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
            GameItemUtil.SetColorfulPartnerCellFrame(quality, FrameBGSprite);

            if (addLevel > 0)
            {
                breakLebel.gameObject.CustomSetActive(true);
                breakLebel.text = "+" + addLevel.ToString();
            }
            else
            {
                breakLebel.gameObject.CustomSetActive(false);
            }

            CharTypeSprite.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[info.char_type];
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, CharTypeSprite.transform, (PartnerGrade)info.role_grade, info.char_type);
            LevelLabel.text = m_data.level.ToString();

            StarController.SetSrarList(m_data.star, 0);
        }
コード例 #5
0
        public override void Fill(LTPartnerData itemData)
        {
            if (itemData == null)
            {
                Clean();
                return;
            }
            tplId = itemData.HeroStat.id;
            Hotfix_LT.Data.HeroInfoTemplate m_data = itemData.HeroInfo;
            MainIcon.spriteName = m_data.icon;
            if (m_data.char_type == Hotfix_LT.Data.eRoleAttr.None)
            {
                QualityIcon.gameObject.CustomSetActive(false);
            }
            else
            {
                QualityIcon.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[m_data.char_type];
                HotfixCreateFX.ShowCharTypeFX(charFx, efClip, QualityIcon.transform, (PartnerGrade)m_data.role_grade, (Hotfix_LT.Data.eRoleAttr)m_data.char_type);
            }

            GradeIcon.spriteName = UIItemLvlDataLookup.LvlToStr((m_data.role_grade + 1).ToString());
            FrameBG.color        = UIItemLvlDataLookup.GetItemFrameBGColor((m_data.role_grade + 1).ToString());
            StarController.SetSrarList(itemData.Star, itemData.IsAwaken);

            BG.color = (LTBountyTaskSelectController.Target != tplId) ? new Color(213f / 255f, 223f / 255f, 232f / 255f) : new Color(125f / 255f, 202f / 255f, 1f);

            mDMono.gameObject.CustomSetActive(true);
        }
コード例 #6
0
        private void OnChallengerListener(string dataId, INodeData data)
        {
            ArenaChallenger challenger = data as ArenaChallenger;

            Fill(challenger);

            Hotfix_LT.Data.HeroInfoTemplate info = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(challenger.charId, challenger.skin);
            StartCoroutine(CreateModelCoroutine(info.model_name));
        }
コード例 #7
0
        public void SetMatchBase(LTHeroBattleAPI.HeroBattleMatchBase data)
        {
            matchData.isGetReward = data.IsGetReward;
            matchData.victoryNum  = data.VictoryCount;
            matchData.defeatNum   = data.DefeatCount;
            matchData.defeatMax   = (int)Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigValue("heroBattleDefeatMaxCount");
            matchData.victoryMax  = (int)Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigValue("heroBattleVictoryMaxCount");
            matchData.listLimitFreeHero.Clear();
            matchData.listLimitFreeCell.Clear();
            matchData.listBaseHero.Clear();
            matchData.listBaseHeroCell.Clear();
            for (int i = 0; i < data.FreeHeros.Count; i++)
            {
                int tplID = int.Parse((string)data.FreeHeros[i]);
                matchData.listLimitFreeHero.Add(tplID);
                Hotfix_LT.Data.HeroStatTemplate heroStat = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(tplID);
                if (heroStat != null)
                {
                    Hotfix_LT.Data.HeroInfoTemplate heroInfo   = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(heroStat.character_id);
                    HeroBattleChoiceCellData        choiceCell = new HeroBattleChoiceCellData(tplID, heroInfo, 0);
                    matchData.listLimitFreeCell.Add(choiceCell);
                }
                else
                {
                    EB.Debug.LogError("SetMatchBase.FreeHeros:heroStat is null tplID={0}", tplID);
                }
            }

            for (int i = 0; i < data.BaseHeroes.Count; i++)
            {
                int tplID = int.Parse((string)data.BaseHeroes[i]);
                matchData.listBaseHero.Add(tplID);
                Hotfix_LT.Data.HeroStatTemplate heroStat = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(tplID);
                if (heroStat != null)
                {
                    Hotfix_LT.Data.HeroInfoTemplate heroInfo   = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(heroStat.character_id);
                    HeroBattleChoiceCellData        choiceCell = new HeroBattleChoiceCellData(tplID, heroInfo, 0);
                    matchData.listBaseHeroCell.Add(choiceCell);
                }
                else
                {
                    EB.Debug.LogError("SetMatchBase.BaseHeroes:heroStat is null tplID={0}", tplID);
                }
            }

            choiceData.AddHeroPool();

            // if (LTHeroBattleEvent.NotifyRefreshMatchData != null)
            // {
            //     LTHeroBattleEvent.NotifyRefreshMatchData(matchData);
            // }
        }
コード例 #8
0
        public IEnumerator CreateBuddyModel(Hotfix_LT.Data.HeroInfoTemplate charTpl)
        {
            if (!string.IsNullOrEmpty(charTpl.portrait))
            {
                HeroTex.gameObject.CustomSetActive(false);
                HeroIcon.gameObject.CustomSetActive(true);
                HeroIcon.spriteName = charTpl.portrait;

                TweenPosition TP = HeroIcon.transform.GetComponent <TweenPosition>();
                if (TP != null)
                {
                    TP.ResetToBeginning();
                    TP.PlayForward();
                }
            }
            else
            {
                HeroIcon.gameObject.CustomSetActive(false);
                HeroTex.gameObject.CustomSetActive(true);
                mModelName     = charTpl.model_name;
                HeroTex.uvRect = new Rect(0.0f, 0.0f, 1.0f, 1.0f);
                LobbyCameraData lobby_cam = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(charTpl.id).lobby_camera;
                Loader = new GM.AssetLoader <GameObject>("UI3DLobby", controller.gameObject);
                UI3DLobby.Preload(mModelName);
                yield return(Loader);

                if (Loader.Success)
                {
                    Loader.Instance.transform.parent = HeroTex.transform;
                    Lobby = Loader.Instance.GetMonoILRComponent <UI3DLobby>();
                }

                if (Lobby != null)
                {
                    Lobby.VariantName = mModelName;

                    Lobby.SetCameraPos(lobby_cam.Position);
                    Lobby.SetCameraRot(lobby_cam.Rotation);
                    Lobby.SetCameraMode(lobby_cam.Size, lobby_cam.Orthographic);

                    Lobby.ConnectorTexture = HeroTex;

                    TweenPosition TP = HeroTex.transform.GetComponent <TweenPosition>();
                    if (TP != null)
                    {
                        TP.ResetToBeginning();
                        TP.PlayForward();
                    }
                }
            }
        }
コード例 #9
0
        /// <summary>
        /// 获取伙伴类型的图标名称(sr, ssr)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        private string GetPartnerTypeName(string id)
        {
            Hotfix_LT.Data.HeroInfoTemplate tempInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfoByStatId(int.Parse(id));
            if (tempInfo != null)
            {
                PartnerGrade partnerGrade = (PartnerGrade)tempInfo.role_grade;
                if (LTPartnerConfig.PARTNER_GRADE_STR_DIC.ContainsKey(partnerGrade))
                {
                    return(LTPartnerConfig.PARTNER_GRADE_STR_DIC[partnerGrade]);
                }
            }

            return(string.Empty);
        }
コード例 #10
0
 /// <summary>
 /// 通过英雄伙伴id获取物怪的信息
 /// </summary>
 /// <param name="heroTplID">英雄伙伴id</param>
 /// <returns></returns>
 private HeroBattleChoiceCellData GetMonsterInfo(int heroTplID, int curSkin)
 {
     Hotfix_LT.Data.MonsterInfoTemplate heroStat = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetMonsterInfo(heroTplID);
     if (heroStat != null)
     {
         Hotfix_LT.Data.HeroInfoTemplate heroInfo   = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(heroStat.character_id, curSkin);
         HeroBattleChoiceCellData        choiceCell = new HeroBattleChoiceCellData(heroTplID, heroInfo, 0);
         return(choiceCell);
     }
     else
     {
         EB.Debug.LogError("SetMatchBase:heroStat is null tplID={0}", heroTplID);
         return(null);
     }
 }
コード例 #11
0
        public override void OnEnable()
        {
            int monsterID = LTWorldBossDataManager.Instance.GetWorldBossMonsterID();

            if (monsterID == 0)
            {
                return;
            }
            Hotfix_LT.Data.MonsterInfoTemplate monsterTpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetMonsterInfo(monsterID);
            if (monsterTpl == null)
            {
                EB.Debug.LogError("LTWorldBossHudController InitBoss, monsterTpl is Error monsterID = {0}", monsterID);
                return;
            }

            Hotfix_LT.Data.HeroInfoTemplate info = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(monsterTpl.character_id);
            if (info == null)
            {
                EB.Debug.LogError("LTWorldBossHudController InitBoss, info is Error monsterTpl.character_id = {0}", monsterTpl.character_id);
                return;
            }

            HpBarMaxNum = monsterTpl.hp_number;
            if (BossIcon != null)
            {
                BossIcon.spriteName = info.icon;
            }
            NameLabel.text = info.name;

            if (CountDownTime != null)
            {
                CountDownTime.EndTime = LTWorldBossDataManager.Instance.GetBossEndTime();
            }

            object obj = null;

            DataLookupsCache.Instance.SearchDataByID("world_boss.blood", out obj);
            if (obj != null)
            {
                OnLookupUpdate("world_boss", obj);
            }

            if (isOpenDebugWorldBoss)
            {
                LTWorldBossDataManager.Instance.IsOpenDebugWorldBoss = true;
            }
        }
コード例 #12
0
        static public List <HeroBattleChoiceCellData> GetHeroListByAttr(Hotfix_LT.Data.eRoleAttr type)
        {
            List <HeroBattleChoiceCellData> listCellData = new List <HeroBattleChoiceCellData>();

            Hotfix_LT.Data.HeroStatTemplate[] allPartnerCollection = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStats();
            for (var i = 0; i < allPartnerCollection.Length; i++)
            {
                var heroTpl = allPartnerCollection[i];
                Hotfix_LT.Data.HeroInfoTemplate heroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(heroTpl.character_id);
                if (heroInfo.char_type == type && heroInfo.isShowInClash)
                {
                    HeroBattleChoiceCellData choiceCell = new HeroBattleChoiceCellData(heroTpl.id, heroInfo, 0);
                    listCellData.Add(choiceCell);
                }
            }
            return(listCellData);
        }
コード例 #13
0
        public void Show()
        {
            CurrentHPPipe.gameObject.SetActive(true);
            NextHPPipe.gameObject.SetActive(true);
            LerpHPPipe.gameObject.SetActive(true);
            HeadHud.SetActive(true);
            ChestObj.SetActive(SceneLogic.BattleType == eBattleType.AllianceCampaignBattle);
            HpObj.SetActive(SceneLogic.BattleType != eBattleType.AllianceCampaignBattle);
            HurtLabel.gameObject.SetActive(SceneLogic.BattleType == eBattleType.AllianceCampaignBattle);
            //
            string characterId = Hotfix_LT.Data.CharacterTemplateManager.Instance.TemplateidToCharacteridEX(characterData.TplId.ToString());

            Hotfix_LT.Data.HeroInfoTemplate infoTpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(characterId, characterData.Skin);
            LTUIUtil.SetText(NameLabel, infoTpl.name);
            Icon.spriteName = infoTpl.icon;

            Indicator.transform.parent.gameObject.SetActive(false);
            foreach (var skill in characterData.SkillDataList)
            {
                //BossSkillItem item = GameUtils.InstantiateEx<BossSkillItem>(BSItem, SkillGrid.transform, skill.Value.Index.ToString());

                GameObject go = GameObject.Instantiate(BSItem.mDMono.gameObject) as GameObject;
                go.name = skill.Value.Index.ToString();
                go.transform.SetParent(SkillGrid.transform, false);
                if (false == go.activeSelf)
                {
                    go.gameObject.SetActive(true);
                }
                BossSkillItem item = go.GetMonoILRComponent <BossSkillItem>();

                Hotfix_LT.Data.SkillTemplate tplData = Hotfix_LT.Data.SkillTemplateManager.Instance.GetTemplate(skill.Value.ID);
                item.Fill(tplData, skill.Value.Level);
                if (tplData.Type == Hotfix_LT.Data.eSkillType.INDICATOR)
                {
                    Indicator.transform.parent.gameObject.SetActive(true);
                    Indicator.text = "0";
                }
            }
            SkillGrid.Reposition();
            BuffGrid.Reposition();
            if (characterData.SkillDataList.Count >= 5)
            {
                SkillGrid.GetComponent <UIWidget>().enabled = true;
            }
        }
コード例 #14
0
            public void FillData(string Id)
            {
                if (!string.IsNullOrEmpty(Id))
                {
                    LTShowItemData itemData = new LTShowItemData(Id, 0, LTShowItemType.TYPE_HERO, false);
                    heroInfoId = itemData.id;
                    int cid = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(itemData.id).character_id;
                    Hotfix_LT.Data.HeroInfoTemplate data = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(cid);
                    icon.spriteName      = data.icon;
                    roleIcon.spriteName  = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[data.char_type];
                    gradeIcon.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[(PartnerGrade)data.role_grade];

                    HotfixCreateFX.ShowCharTypeFX(charFx, efClip, roleIcon.transform, (PartnerGrade)data.role_grade, data.char_type);
                    btn.gameObject.CustomSetActive(true);
                }
                else
                {
                    btn.gameObject.CustomSetActive(false);
                }
            }
コード例 #15
0
        public HeroBattleChoiceCellData(int heroTplID, Hotfix_LT.Data.HeroInfoTemplate Tpl, int awakeLevel)
        {
            //LTPartnerData data = LTPartnerDataManager.Instance.GetPartnerByStatId(heroTplID);
            //if (data != null) {
            //    Tpl = data.HeroInfo;
            //   EB.Debug.Log("HeroBattleChoiceCellData awaken:" + Tpl.model_name);
            //    this.isAwake = data.IsAwaken;
            //}

            this.heroTplID   = heroTplID;
            this.iconName    = Tpl.icon;
            this.modelName   = Tpl.model_name;
            this.heroName    = Tpl.name;
            this.type        = Tpl.char_type;
            this.ssrType     = Tpl.role_grade;
            this.quality     = 6; //默认满品质
            this.choiceSpend = LTHeroBattleModel.GetSpend(this.ssrType);
            this.isUnLock    = false;
            this.isFree      = true;
            this.isAwake     = awakeLevel;
        }
コード例 #16
0
 private HeroBattleChoiceCellData GetHeroCellCommon(int heroTplID)
 {
     Hotfix_LT.Data.HeroStatTemplate heroStat = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(heroTplID);
     if (heroStat != null)
     {
         Hotfix_LT.Data.HeroInfoTemplate heroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(heroStat.character_id);
         LTPartnerData            data            = LTPartnerDataManager.Instance.GetPartnerByStatId(heroTplID);
         HeroBattleChoiceCellData choiceCell      = new HeroBattleChoiceCellData(heroTplID, heroInfo, 0);
         int curskin = 0;
         if (data != null)
         {
             curskin = data.CurSkin;
             choiceCell.modelName = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(data.InfoId, curskin).model_name;
         }
         return(choiceCell);
     }
     else
     {
         EB.Debug.LogError("SetMatchBase:heroStat is null tplID={0}", heroTplID);
         return(null);
     }
 }
コード例 #17
0
        private void Refresh()
        {
            LTUIUtil.SetLevelText(LevelLabSprite, levelLab, mData.level + mData.peak);
            int quality  = 0;
            int addLevel = 0;

            LTPartnerDataManager.GetPartnerQuality(mData.awakeLevel, out quality, out addLevel);

            frameSp.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
            GameItemUtil.SetColorfulPartnerCellFrame(quality, frameBGSp);

            if (addLevel > 0)
            {
                breskLevelLab.gameObject.SetActive(true);
                breskLevelLab.text = "+" + addLevel.ToString();
            }
            else
            {
                breskLevelLab.gameObject.SetActive(false);
            }

            parentTypeSp.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[(Hotfix_LT.Data.eRoleAttr)mData.charType];

            starController.SetSrarList(mData.star, mData.isAwaken);

            Hotfix_LT.Data.HeroStatTemplate tempHeroStat = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(mData.templateId);

            if (tempHeroStat != null)
            {
                Hotfix_LT.Data.HeroInfoTemplate tempHeroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(tempHeroStat.character_id, mData.skin);
                if (tempHeroInfo != null)
                {
                    iconSp.spriteName = tempHeroInfo.icon;
                    HotfixCreateFX.ShowCharTypeFX(charFx, efClip, parentTypeSp.transform, (PartnerGrade)tempHeroInfo.role_grade, (Hotfix_LT.Data.eRoleAttr)mData.charType);
                    HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, frameSp.transform, quality, upgradeefclip);
                }
            }
        }
コード例 #18
0
        public void InitializeData(Hotfix_LT.Combat.CombatCharacterSyncData data /*int tplId,int maxHp*/)
        {
            characterData = data;
            //TplId = tplId;
            //MaxHp = maxHp;
            Hotfix_LT.Data.MonsterInfoTemplate monsterInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetMonsterInfo(data.TplId);
            if (monsterInfo != null)
            {
                if (monsterInfo.hp_number != 0)
                {
                    Hp_Number = monsterInfo.hp_number;
                    PerPipeHp = data.MaxHp / monsterInfo.hp_number;
                }

                Hotfix_LT.Data.HeroInfoTemplate heroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(monsterInfo.character_id);
                if (heroInfo != null)
                {
                    MonsterType.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[(Hotfix_LT.Data.eRoleAttr)heroInfo.char_type];
                    //UIShowItem.ShowCharTypeFX(charFx, efClip, MonsterType.transform, (PartnerGrade)heroInfo.role_grade, heroInfo.char_type);
                }
            }
            this.ResetCurrentHurt(m_CurrentHurtTotal);
        }
コード例 #19
0
        private void InitBoss()
        {
            int monsterID = LTWorldBossDataManager.Instance.GetWorldBossMonsterID();

            Hotfix_LT.Data.MonsterInfoTemplate monsterTpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetMonsterInfo(monsterID);
            if (monsterTpl == null)
            {
                EB.Debug.LogError("LTWorldBossHudController InitBoss, monsterTpl is Error monsterID = {0}", monsterID);
                return;
            }

            Hotfix_LT.Data.HeroInfoTemplate info = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(monsterTpl.character_id);
            if (info == null)
            {
                EB.Debug.LogError("LTWorldBossHudController InitBoss, info is Error monsterTpl.character_id = {0}", monsterTpl.character_id);
                return;
            }

            StartCoroutine(CreateBossModel(info.model_name));

            LTUIUtil.SetText(NameLabel, info.name);
            TypeSprite.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[info.char_type];
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, TypeSprite.transform, (PartnerGrade)info.role_grade, info.char_type);
        }
コード例 #20
0
 public override void SetMenuData(object param)
 {
     base.SetMenuData(param);
     mInfoId   = (int)param;
     mInfoTemp = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(mInfoId);
 }
コード例 #21
0
        IEnumerator StartDarw()
        {
            List <LTDrawCardData> Items = LTDrawCardDataManager.Instance.GetDrawCardData();

            if (itemData == null)
            {
                itemData = new List <LTShowItemData>();
            }
            else
            {
                itemData.Clear();
            }
            for (int i = 0; i < Items.Count; i++) //进行显示上的英雄与碎片转换
            {
                bool isHeroShard = false;
                for (int j = 0; j < i; j++)
                {
                    if (Items[i].data == Items[j].data && Items[i].type == LTShowItemType.TYPE_HERO && Items[j].type == LTShowItemType.TYPE_HERO)
                    {
                        isHeroShard = true;
                    }
                }
                if (Items[i].type == LTShowItemType.TYPE_HERO && LTDrawCardDataManager.Instance.isHeroShard(Items[i].data) || isHeroShard)
                {
                    int Cid = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(Items[i].data).character_id;
                    int Num = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(Cid).summon_shard;
                    itemData.Add(new LTShowItemData(Items[i].data, Num, LTShowItemType.TYPE_HEROSHARD));
                }
                else
                {
                    itemData.Add(new LTShowItemData(Items[i].data, Items[i].quantityNum, Items[i].type));

                    if (Items[i].type.Equals(LTShowItemType.TYPE_HERO))
                    {
                        Hotfix_LT.Data.HeroStatTemplate tempStat = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(Items[i].data);
                        if (tempStat != null)
                        {
                            Hotfix_LT.Data.HeroInfoTemplate tempInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(tempStat.character_id);
                            if (tempInfo != null)
                            {
                                if (tempInfo.cultivateGift == 1)
                                {
                                    LTChargeManager.Instance.IsShowDrawGift = true;
                                    EB.Debug.Log("LTGetItemUIController OnAddToStack Draw is Success!");
                                }
                            }
                            else
                            {
                                EB.Debug.LogError("LTGetItemUIController OnAddToStack Hotfix_LT.Data.HeroInfoTemplate is Null, id = {0}", tempStat.character_id);
                            }
                        }
                        else
                        {
                            EB.Debug.LogError("LTGetItemUIController OnAddToStack Hotfix_LT.Data.HeroStatTemplate is Null, id = {0}", Items[i].data);
                        }
                    }
                }
            }

            if (m_type == DrawCardType.hc)
            {
                Scroll.mDMono.GetComponent <UIGrid>().cellHeight = 650;
            }
            else
            {
                Scroll.mDMono.GetComponent <UIGrid>().cellHeight = 400;
            }

            Scroll.SetItemDatas(itemData, false);
            if (DrawCardEvent.HideFxParent != null)
            {
                DrawCardEvent.HideFxParent();
            }

            {//抽奖特效表现
                GameObject DrawingFx;
                if (m_type == DrawCardType.gold)
                {
                    DrawingFx = SliverDrawingFx;
                    long_wait = new WaitForSeconds(2.7f);
                    FusionAudio.PostEvent("UI/New/ChouJiang", true);
                    SkipBtn.CustomSetActive(true);
                }
                else if (m_type == DrawCardType.ur)
                {
                    DrawingFx = GoldDrawingFx;
                    long_wait = new WaitForSeconds(8.2f);
                    FusionAudio.PostEvent("UI/New/ChouJiangZuanShi", true);
                    SkipBtn.CustomSetActive(true);
                }
                else
                {
                    DrawingFx = GoldDrawingFx;
                    long_wait = new WaitForSeconds(8.2f);
                    FusionAudio.PostEvent("UI/New/ChouJiangZuanShi", true);
                    if (!GuideNodeManager.IsGuide)
                    {
                        SkipBtn.CustomSetActive(true);
                    }
                }
                DrawingFx.CustomSetActive(true);
                yield return(long_wait);

                if (isSkip)
                {
                    yield break;
                }
                MainHud.CustomSetActive(true);
            }

            if (isSkip)
            {
                yield break;
            }

            StartCoroutine(ShowItemAmi(itemData));
            yield return(small_wait);

            FxHud.CustomSetActive(false);
        }
コード例 #22
0
        /// <summary>
        /// 点击跳过按钮
        /// </summary>
        public void OnClickJumpTween()
        {
            StopAllCoroutines();
            JumpTweenObj.CustomSetActive(false);
            if (!string.IsNullOrEmpty(curTemplate.awakeSkin) && isCheckSkin == false)
            {
                LTPartnerDataManager.Instance.PartnerUseAwakeSkin(curpartnerData.HeroId, 1, MainLandLogic.GetInstance().SceneId, delegate(bool isccuess)
                {
                    if (isccuess)
                    {
                        curpartnerData = LTPartnerDataManager.Instance.RefreshSkinData(curpartnerData.HeroId);
                        Hotfix_LT.Data.HeroInfoTemplate info = curpartnerData.HeroInfo;
                        StartCoroutine(CreateBuddyModel(ShowLobbyTexture, info.model_name, false, false));
                        SetPartnerStar(curpartnerData.IsAwaken);
                        //修改伙伴界面显示
                        Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerAwakenSucc, curpartnerData);
                        //设置领队
                        if (curpartnerData.StatId == LTMainHudManager.Instance.UserLeaderTID)
                        {
                            if (!AllianceUtil.IsInTransferDart)
                            {
                                Hotfix_LT.Messenger.Raise("SetLeaderEvent");
                            }
                        }
                    }
                });
            }
            else
            {
                SetPartnerStar(curpartnerData.IsAwaken);
                StartCoroutine(CreateBuddyModel(ShowLobbyTexture, curpartnerData.HeroInfo.model_name, false, false));
                Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerAwakenSucc, curpartnerData);
            }
            Bg2.gameObject.CustomSetActive(true);
            BgSprite.color = new Color(1, 1, 1, 1);
            Fx_Hit.CustomSetActive(false);
            FX_Cast.CustomSetActive(false);
            SetPowerShow();
            TextureTween.PlayForward();
            AttrObj.CustomSetActive(true);
            LifeShowTween.gameObject.CustomSetActive(true);
            AttackShowTween.gameObject.CustomSetActive(true);
            SpeedShowTween.gameObject.CustomSetActive(true);
            DefShowTween.gameObject.CustomSetActive(true);
            if (!string.IsNullOrEmpty(curTemplate.awakeSkin))
            {
                SkinObj.CustomSetActive(true);
                AttriExtralAddObj.transform.localPosition = new Vector3(621, attriAddObjPosWithSkin, 0);
                SkillAwakeObj.transform.localPosition     = new Vector3(621, skillObjPosWithSkin, 0);
            }
            else
            {
                AttriExtralAddObj.transform.localPosition = new Vector3(621, attriAddObjPosWithoutSkin, 0);
                SkillAwakeObj.transform.localPosition     = new Vector3(621, skillObjPosWithoutSkin, 0);
            }
            if (curTemplate.awakeType == 1)
            {
                SkillAwakeObj.CustomSetActive(true);
            }
            else
            {
                AttriExtralAddObj.gameObject.CustomSetActive(true);
            }

            OnClickTipObj.CustomSetActive(true);
            canClose = true;
        }
コード例 #23
0
        /// <summary>
        /// 动画序列
        /// </summary>
        /// <returns></returns>
        private IEnumerator PlayAwakenTween()
        {
            JumpTweenObj.CustomSetActive(true);
            FX_Cast.CustomSetActive(true);
            yield return(new WaitForSeconds(3.0f));

            Fx_Hit.CustomSetActive(true);
            yield return(new WaitForSeconds(0.2f));

            //切换皮肤
            if (!string.IsNullOrEmpty(curTemplate.awakeSkin))
            {
                LTPartnerDataManager.Instance.PartnerUseAwakeSkin(curpartnerData.HeroId, 1, MainLandLogic.GetInstance().SceneId, delegate(bool isccuess)
                {
                    if (isccuess)
                    {
                        curpartnerData = LTPartnerDataManager.Instance.RefreshSkinData(curpartnerData.HeroId);
                        Hotfix_LT.Data.HeroInfoTemplate info = curpartnerData.HeroInfo;
                        StartCoroutine(CreateBuddyModel(ShowLobbyTexture, info.model_name, false, true));
                        SetPartnerStar(curpartnerData.IsAwaken);
                        //修改伙伴界面显示
                        Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerAwakenSucc, curpartnerData);
                        //设置领队
                        if (curpartnerData.StatId == LTMainHudManager.Instance.UserLeaderTID)
                        {
                            if (!AllianceUtil.IsInTransferDart)
                            {
                                Hotfix_LT.Messenger.Raise("SetLeaderEvent");
                            }
                        }
                        isCheckSkin = true;
                    }
                });
            }
            else
            {
                SetPartnerStar(curpartnerData.IsAwaken);
                StartCoroutine(CreateBuddyModel(ShowLobbyTexture, curpartnerData.HeroInfo.model_name, false, true));
                Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerAwakenSucc, curpartnerData);
            }
            yield return(new WaitForSeconds(1.2f));

            Fx_Hit.CustomSetActive(false);
            FX_Cast.CustomSetActive(false);
            SetPowerShow();
            yield return(new WaitForSeconds(TextureTween.duration));

            yield return(new WaitForSeconds(1.2f));

            TextureTween.ResetToBeginning();
            TextureTween.PlayForward();
            BlockBg.PlayForward();
            Bg2.ResetToBeginning();
            Bg2.gameObject.CustomSetActive(true);
            Bg2.PlayForward();
            yield return(new WaitForSeconds(TextureTween.duration));

            //播放属性加成
            if (string.IsNullOrEmpty(curTemplate.awakeSkin) && curTemplate.awakeType == 1)
            {
                AttriBg.height = 839;
            }
            else if (!string.IsNullOrEmpty(curTemplate.awakeSkin) && curTemplate.awakeType == 2)
            {
                AttriBg.height = 759;
            }
            else if (!string.IsNullOrEmpty(curTemplate.awakeSkin) && curTemplate.awakeType == 1)
            {
                AttriBg.height = 975;
            }
            else if (string.IsNullOrEmpty(curTemplate.awakeSkin) && curTemplate.awakeType == 2)
            {
                AttriBg.height = 759;
            }

            AttrObj.CustomSetActive(true);
            LifeShowTween.ResetToBeginning();
            LifeShowTween.gameObject.CustomSetActive(true);
            LifeShowTween.PlayForward();
            yield return(DelayTimes);

            AttackShowTween.ResetToBeginning();
            AttackShowTween.gameObject.CustomSetActive(true);
            AttackShowTween.PlayForward();
            yield return(DelayTimes);

            DefShowTween.ResetToBeginning();
            DefShowTween.gameObject.CustomSetActive(true);
            DefShowTween.PlayForward();
            yield return(DelayTimes);

            SpeedShowTween.ResetToBeginning();
            SpeedShowTween.gameObject.CustomSetActive(true);
            SpeedShowTween.PlayForward();
            yield return(DelayTimes);

            if (!string.IsNullOrEmpty(curTemplate.awakeSkin))
            {
                SkinObj.transform.GetComponent <TweenScale>().ResetToBeginning();
                SkinObj.CustomSetActive(true);
                SkinObj.transform.GetComponent <TweenScale>().PlayForward();
                yield return(DelayTimes);

                AttriExtralAddObj.transform.localPosition = new Vector3(621, attriAddObjPosWithSkin, 0);
                SkillAwakeObj.transform.localPosition     = new Vector3(621, skillObjPosWithSkin, 0);
            }
            else
            {
                AttriExtralAddObj.transform.localPosition = new Vector3(621, attriAddObjPosWithoutSkin, 0);
                SkillAwakeObj.transform.localPosition     = new Vector3(621, skillObjPosWithoutSkin, 0);
            }
            if (curTemplate.awakeType == 1)
            {
                SkillAwakeObj.transform.GetComponent <TweenScale>().ResetToBeginning();
                SkillAwakeObj.CustomSetActive(true);
                SkillAwakeObj.transform.GetComponent <TweenScale>().PlayForward();
            }
            else
            {
                AttriExtralAddObj.transform.GetComponent <TweenScale>().ResetToBeginning();
                AttriExtralAddObj.gameObject.CustomSetActive(true);
                AttriExtralAddObj.transform.GetComponent <TweenScale>().PlayForward();
            }
            yield return(DelayTimes);

            //SkinGetTip.gameObject.CustomSetActive(true);
            OnClickTipObj.CustomSetActive(true);
            JumpTweenObj.CustomSetActive(false);
            canClose = true;
            yield return(null);
        }