Exemple #1
0
        public override void Fill(ApplyHelpNode item)
        {
            mItem = item;

            LTUIUtil.SetText(PlayerNameLabel, mItem.PlayerName);
            PlayerLevelLabel.text  = mItem.PlayerLevel.ToString();
            PlayerIcon.spriteName  = mItem.Portrait;
            PlayerFrame.spriteName = EconemyTemplateManager.Instance.GetHeadFrame(mItem.HeadFrame).iconId;
            RefreshBtnState();
        }
Exemple #2
0
        protected override void UpdateInfo()
        {
            string temp = string.Empty;

            if (m_localPlayerRankData != null)
            {
                temp = string.Format("{0}[fff348]{1}[-]        {2}", EB.Localizer.GetString("ID_ARENA_LOCAL_RANK"), m_localPlayerRankData.m_Rank + 1, m_localPlayerRankData.m_Parm.Replace("\n", "        "));
            }
            LTUIUtil.SetText(m_localPlayerRankLabel, temp);
        }
Exemple #3
0
 public override void Show(bool isShowing)
 {
     base.Show(isShowing);
     if (isShowing && string.IsNullOrEmpty(license))
     {
         UIAccountController.License(delegate(string licenseStr)
         {
             LTUIUtil.SetText(TextLabel, license = licenseStr);
         });
     }
 }
Exemple #4
0
 public void SetData(string itemId, int maxCount = 999)
 {
     ItemId   = itemId;
     MaxCount = maxCount;
     if (mLabel == null)
     {
         mLabel = mDL.transform.GetComponent <UILabel>();
     }
     LTUIUtil.SetText(mLabel, 0.ToString());
     Add();
 }
Exemple #5
0
        public void SetData(LegionData data)
        {
            if (!data.legionIconSptName.Equals(""))
            {
                legionIconSpt.spriteName = data.legionIconSptName;
            }
            iconBGSp.spriteName = data.legionIconBGSptName;

            LTUIUtil.SetText(legionNameLabel, data.legionName);
            LTUIUtil.SetText(legionLevelLabel, data.legionLevel.ToString());
            LTUIUtil.SetText(expLabel, string.Format("{0}/{1}", data.currentExp, data.growupExp));
            LTUIUtil.SetText(peopleNumLabel, string.Format("{0}/{1}", data.currentPeopleNum, data.maxPeopleNum));
            LTUIUtil.SetText(bossNameLabel, data.ownerName);
            if (data.notice != null)
            {
                LTUIUtil.SetText(logLabel, data.notice.Equals("") ? logLabel.text : data.notice);
            }
            if (isShow)
            {
                memberItemScroll.SetItemDatas(data.listMember.ToArray());
            }
            //权限
            if (data.userMemberData != null)
            {
                editNameBtn.gameObject.CustomSetActive(data.userMemberData.dutyType == eAllianceMemberRole.Owner);
                switch (data.userMemberData.dutyType)
                {
                case eAllianceMemberRole.Member:
                    PageMemberState = State.Member;
                    ChangeOpen(false, false, false);
                    break;

                case eAllianceMemberRole.Admin:
                    PageMemberState = State.Admin;
                    ChangeOpen(true, false, false);
                    break;

                case eAllianceMemberRole.ExtraOwner:
                    PageMemberState = State.Admin;
                    ChangeOpen(true, true, false);
                    break;

                case eAllianceMemberRole.Owner:
                    PageMemberState = State.Admin;
                    ChangeOpen(true, true, true);
                    break;
                }
            }

            if (scrollView != null)
            {
                scrollView.RestrictWithinBounds(true);
            }
        }
Exemple #6
0
        private void SetContent(int index)
        {
            LTUIUtil.SetText(contentGameObj.GetComponent <UILabel>(), Notices[index].notice);
            LTUIUtil.SetText(contentGameObj.transform.Find("ContentTitle/Label").GetComponent <UILabel>(),
                             Notices[index].type);

            float panelHeight = contentScrollView.GetComponent <UIPanel>().GetViewSize().y;

            contentScrollView.ResetPosition();
            contentScrollView.enabled = (contentGameObj.GetComponent <UILabel>().height + TitleWidth) > panelHeight;
        }
Exemple #7
0
        private void OnInfoListener(string path, INodeData data)
        {
            AllianceEscortUtil.FormatResidueRobDartNum(ResidueRobNumLabel);

            int    residueTransferNum = AllianceEscortUtil.GetResidueTransferDartNum();
            string colorStr           = residueTransferNum > 0 ? LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal;

            LTUIUtil.SetText(ResidueTransferDartNumLabel, string.Format(EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_2955"), colorStr, residueTransferNum));

            LTUIUtil.SetText(TransferDartTimeLabel, Hotfix_LT.Data.EventTemplateManager.Instance.GetActivityOpenTimeStr("escort_start", "escort_stop"));
        }
Exemple #8
0
        public bool UpdateChest()
        {
            int currAchievement = 0;

            DataLookupsCache.Instance.SearchIntByID("user_prize_data.taskacm.curr", out currAchievement);

            List <Hotfix_LT.Data.TimeLimitActivityStageTemplate> stages = Hotfix_LT.Data.EventTemplateManager.Instance.GetTimeLimitActivityStages(ActivityId);
            int stageCount = stages.Count;

            LTHotfixManager.GetManager <TaskManager>().CurrentIndex = GetCurrentStageIndex();
            if (LTHotfixManager.GetManager <TaskManager>().CurrentIndex <= -1 || LTHotfixManager.GetManager <TaskManager>().CurrentIndex >= stageCount)
            {
                EB.Debug.LogError("CurrentIndex <= -1 || CurrentIndex >= stageCount");
                return(false);
            }
            var currentStageData = stages[LTHotfixManager.GetManager <TaskManager>().CurrentIndex];
            int maxAchievement   = currentStageData.stage;

            List <LTShowItemData> itemDatas = new List <LTShowItemData>();

            for (int j = 0; j < currentStageData.reward_items.Count; ++j)
            {
                var            reward   = currentStageData.reward_items[j];
                string         id       = reward.id.ToString();
                int            count    = reward.quantity;
                string         type     = reward.type;
                LTShowItemData itemData = new LTShowItemData(id, count, type, false);
                itemDatas.Add(itemData);
            }

            bool received;

            DataLookupsCache.Instance.SearchDataByID <bool>("user_prize_data.taskacm_reward." + currentStageData.id, out received);
            eReceiveState state = eReceiveState.cannot;

            if (currAchievement >= currentStageData.stage)
            {
                if (received)
                {
                    state = eReceiveState.have;
                }
                else
                {
                    state = eReceiveState.can;
                }
            }
            m_Chest.SetUI(new RewardStageData(currentStageData.id, currentStageData.stage, itemDatas, state));

            LTUIUtil.SetText(m_ProgressLabel, string.Format("{0}/{1}", currAchievement, maxAchievement));
            m_AchievementProgressBar.value = currAchievement / (float)maxAchievement;
            m_ChestRoot.SetActive(true);

            return(true);
        }
Exemple #9
0
        public void SetHp(string heroId, bool isShowTempHp)
        {
            //float fullHp = 0;
            int   level   = 0;
            int   peak    = 0;
            float percent = 0;

            if (int.Parse(heroId) < 0)//是否雇佣
            {
                var hireInfo = LTInstanceHireUtil.GetHireInfoByHeroId(int.Parse(heroId));
                if (hireInfo != null)
                {
                    float fullHp = hireInfo.base_MaxHP;
                    float curHp  = 0;
                    if (isShowTempHp)
                    {
                        curHp = LTHotfixManager.GetManager <SceneManager>().GetChallengeTempHp(heroId);
                    }
                    else
                    {
                        curHp = LTChallengeInstanceHpCtrl.GetCombatHp(heroId);
                    }
                    percent = curHp / fullHp;
                    level   = hireInfo.level;
                }
            }
            else
            {
                if (isShowTempHp)
                {
                    float curHp  = LTHotfixManager.GetManager <SceneManager>().GetChallengeTempHp(heroId);
                    float fullHp = 0;
                    DataLookupsCache.Instance.SearchDataByID <float>(string.Format("userCampaignStatus.challengeChapters.team.{0}.MHP", heroId), out fullHp);
                    percent = curHp / fullHp;
                }
                else
                {
                    percent = LTChallengeInstanceHpCtrl.GetCombatHPPercent(heroId);
                }
                DataLookupsCache.Instance.SearchIntByID(string.Format("heroStats.{0}.stat.level", heroId), out level);

                DataLookupsCache.Instance.SearchIntByID(string.Format("heroStats.{0}.proficiency.1.1", heroId), out peak);
            }

            percent = Mathf.Min(percent, 1);

            PercentLabel.text = percent.ToString("0%");
            HpProgress.value  = percent;

            DeathLabel.gameObject.SetActive(percent <= 0);
            PercentLabel.gameObject.SetActive(percent > 0);

            LTUIUtil.SetLevelText(LevelLabel.transform.parent.GetComponent <UISprite>(), LevelLabel, level + peak);
        }
Exemple #10
0
        public override IEnumerator OnAddToStack()
        {
            string colorStr = (LTBountyTaskHudController.CurHantTimes != 0) ? LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal;

            LTUIUtil.SetText(LeftTimesLabel, string.Format(EB.Localizer.GetString("ID_codefont_in_LTBountyTaskOverController_477"), colorStr, LTBountyTaskHudController.CurHantTimes, LTBountyTaskHudController.TotalHantTimes));
            //重新刷新下主城
            if (LTMainMenuHudController.Instance != null)
            {
                LTMainMenuHudController.Instance.OnFocus();
            }
            return(base.OnAddToStack());
        }
Exemple #11
0
        IEnumerator DoShownVictoryAnimation()
        {
            Hashtable ht = mParam as Hashtable;
            int       changeCityDefend = int.Parse(ht["changeCityDefend"].ToString());

            FusionAudio.PostEvent("UI/New/GuoZhanShengLi", true);
            LTUIUtil.SetText(m_Title, (IsAttack ? EB.Localizer.GetString("ID_codefont_in_NationBattleRatingDialogController_2704_1"): EB.Localizer.GetString("ID_codefont_in_NationBattleRatingDialogController_2704_2")));
            m_Title.gameObject.CustomSetActive(true);
            yield return(new WaitForSeconds(DelayHeroTweenAnimTime));

            yield return(StartCoroutine(DoHerosAnimation()));
        }
Exemple #12
0
        private void ChangeShow(bool IsAdmin)
        {
            if (mailBtn != null)
            {
                mailBtn.gameObject.CustomSetActive(IsAdmin);
            }

            if (managerBtn != null)
            {
                LTUIUtil.SetGreyButtonEnable(managerBtn, IsAdmin);
            }
        }
Exemple #13
0
        public override void Fill(ArenaBattleLog itemData)
        {
            Log = itemData;

            winGo.SetActive(Log.isWon);
            failGo.SetActive(!Log.isWon);
            //var heroStat = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(Log.opponentTpl);
            var heroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(Log.opponentCharID, Log.opponentSkin);

            if (string.IsNullOrEmpty(Log.icon))
            {
                opponentIconSprite.spriteName = heroInfo.icon;
            }
            else
            {
                opponentIconSprite.spriteName = Log.icon;
            }
            opponentFrameSprite.spriteName = EconemyTemplateManager.Instance.GetHeadFrame(Log.opponentFrame).iconId;
            opponentLevelLabel.text        = Log.opponentLevel.ToString();
            //opponentLevelBGSprite.spriteName = UIBuddyShowItem.AttrToLevelBG(heroInfo.char_type);
            LTUIUtil.SetText(opponentNameLabel, Log.opponentName);
            //battleTimeLabel.text = EB.Localizer.FormatPassedDuration(Log.occurTime);
            if (Log.rankChange > 0)
            {
                rankUpLabel.text = rankUpLabel.transform.GetChild(0).GetComponent <UILabel>().text = "+" + Log.rankChange.ToString();
                rankUpLabel.transform.parent.gameObject.SetActive(true);
                rankDownLabel.transform.parent.gameObject.SetActive(false);
                rankNoChangeGO.SetActive(false);
            }
            else if (Log.rankChange < 0)
            {
                rankDownLabel.text = rankDownLabel.transform.GetChild(0).GetComponent <UILabel>().text = (Log.rankChange).ToString();
                rankDownLabel.transform.parent.gameObject.SetActive(true);
                rankUpLabel.transform.parent.gameObject.SetActive(false);
                rankNoChangeGO.SetActive(false);
            }
            else
            {
                rankDownLabel.transform.parent.gameObject.SetActive(false);
                rankUpLabel.transform.parent.gameObject.SetActive(false);
                rankNoChangeGO.SetActive(true);
            }
            if (Log.type == ArenaBattleLog.eChallengeType.Invalid)
            {
                challengerGO.SetActive(false);
                defenderGO.SetActive(false);
            }
            else
            {
                challengerGO.SetActive(Log.isChallenge);
                defenderGO.SetActive(!Log.isChallenge);
            }
        }
Exemple #14
0
        static public void FormatResidueTransferDartNum(UILabel label)
        {
            int residueTransferNum = GetResidueTransferDartNum();

            if (residueTransferNum < 0)
            {
                EB.Debug.LogError("residueTransferNum < 0 num={0}", residueTransferNum);
                residueTransferNum = 0;
            }

            LTUIUtil.SetText(label, LT.Hotfix.Utility.ColorUtility.FormatResidueStr(residueTransferNum, VIPTemplateManager.Instance.GetTotalNum(VIPPrivilegeKey.EscortTimes)));
        }
Exemple #15
0
 public void Fill(RobDartMember data)
 {
     mItemData = data;
     LTUIUtil.SetText(DartNameLabel, AllianceEscortUtil.LocalizeDartName(data.DartName));
     DartQualityBG.spriteName = AllianceEscortUtil.GetDartQualityBGSpriteName(data.DartName);
     PlayerLevelLabel.text    = data.PlayerLevel.ToString();
     HeroPortrait.spriteName  = data.Portrait;
     FramePortrait.spriteName = EconemyTemplateManager.Instance.GetHeadFrame(data.HeadFrame).iconId;
     RewardItem1.LTItemData   = data.Award[0];
     RewardItem2.LTItemData   = data.Award[1];
     Container.CustomSetActive(true);
 }
Exemple #16
0
        public void ShowMainInfo(Hashtable mainInfo)
        {
            if (mainInfo == null)
            {
                return;
            }

            PlayerIconSprite.spriteName  = EB.Dot.String("icon", mainInfo, "");
            PlayerFrameSprite.spriteName = EB.Dot.String("headFrame", mainInfo, "");
            LTUIUtil.SetText(NameLabel, EB.Dot.String("name", mainInfo, ""));
            LTUIUtil.SetText(LevelLabel, EB.Dot.Integer("level", mainInfo, 0).ToString());
        }
Exemple #17
0
 public override void ClickTitleRefreshGrid()
 {
     if (rankdatas != null && rankdatas.Count > 0)
     {
         m_gridScroll.dataItems = rankdatas.ToArray();
     }
     else
     {
         m_gridScroll.Clear();
         LTUIUtil.SetText(m_localPlayerRankLabel, string.Empty);
     }
 }
Exemple #18
0
        /*public float TestStartPercnt = 0;
         *
         * public float TestEndPercnt = 0.5f;
         *
         * public int TestAddLevel = 5;
         *
         * public int TestStartLevel = 1;
         *
         * private void OnGUI()
         * {
         *  if (GUILayout.Button("Set", GUILayout.Height(32.0f), GUILayout.Width(130.0f)))
         *  {
         *      LTUIUtil.SetText(m_Level, TestStartLevel.ToString());
         *      m_Exp_Progress.value = TestStartPercnt;
         *      StartCoroutine(PlayExpProgressAni(TestStartPercnt, TestEndPercnt, TestAddLevel, TestStartLevel));
         *  }
         * }*/


        private IEnumerator PlayExpProgressAni(float startPercent, float endPercent, int addLevel, int startLevel)
        {
            LTUIUtil.SetText(m_Level, startLevel.ToString());
            m_Exp_Progress.value = startPercent;
            if (addLevel > 0)
            {
                int tempAddLevel = addLevel;
                while (tempAddLevel >= 0)
                {
                    if (tempAddLevel == addLevel)
                    {
                        yield return(LerpExp(startPercent, 1));

                        tempAddLevel = tempAddLevel - 1;
                    }
                    else if (tempAddLevel == 0)
                    {
                        yield return(LerpExp(0, endPercent));

                        break;
                    }
                    else
                    {
                        yield return(LerpExp(0, 1));

                        tempAddLevel = tempAddLevel - 1;
                    }
                    LTUIUtil.SetText(m_Level, (startLevel + addLevel - tempAddLevel).ToString());

                    if (TweenScale != null)
                    {
                        TweenScale.ResetToBeginning();
                        TweenScale.PlayForward();
                    }
                    if (LevelUpFx != null)
                    {
                        LevelUpFx.SetActive(true);
                    }
                    if (LevelUpBarFx != null)
                    {
                        LevelUpBarFx.SetActive(true);
                    }
                }
            }
            else
            {
                yield return(LerpExp(startPercent, endPercent));

                LTUIUtil.SetText(m_Level, startLevel.ToString());
            }
            //m_Exp_Progress.value = endPercent;
        }
Exemple #19
0
        public virtual void Fill(OtherPlayerPartnerData data, bool canOpen = true)
        {
            if (data == null || data.Level == 0)
            {
                mDMono.gameObject.SetActive(false);
                return;
            }

            this.canOpen = canOpen;
            PartnerData  = data;
            LevelLabel.gameObject.CustomSetActive(data.Level > 0);
            LevelLabel.text = data.Level.ToString();
            LTUIUtil.SetLevelText(LevelBgSprite, LevelLabel, data.Level + data.AllRoundLevel);
            AttrBGSprite.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[data.Attr];
            LTPartnerConfig.SetLevelSprite(AttrBGSprite, data.Attr, data.ArtifactLevel >= 0);
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, AttrBGSprite.transform, (PartnerGrade)data.QualityLevel, data.Attr);
            IconSprite.spriteName = data.Icon;

            // 新增
            if (BreakLabel != null && QualityBorderSpriteBg != null)
            {
                SetStarNum(data.Star, data.awakenLevel);
                int quality  = 0;
                int addLevel = 0;
                LTPartnerDataManager.GetPartnerQuality(data.UpGradeId, out quality, out addLevel);
                GameItemUtil.SetColorfulPartnerCellFrame(quality, QualityBorderSpriteBg);
                HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, QualityBorderSprite.transform, quality, upgradeefclip);
                QualityBorderSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];

                if (addLevel > 0)
                {
                    BreakLabel.gameObject.SetActive(true);
                    BreakLabel.text = "+" + addLevel.ToString();
                }
                else
                {
                    BreakLabel.gameObject.SetActive(false);
                }
            }
            else
            {
                //    LevelAttrBGSprite.spriteName = UIBuddyShowItem.AttrToLevelBG(data.Attr);
                QualityBorderSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[data.QualityLevel];
                GameItemUtil.SetColorfulPartnerCellFrame(data.QualityLevel, QualityBorderSpriteBg);
                HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, QualityBorderSprite.transform, data.QualityLevel, upgradeefclip);
                SetStarNum(data.Star, data.awakenLevel);
            }
            if (data != null)
            {
                mDMono.gameObject.CustomSetActive(true);
            }
        }
Exemple #20
0
        public override void Start()
        {
            m_FuncTpl          = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(m_FuncId);
            IsDayLimitOpenFunc = m_FuncTpl.condition.Contains("d");

            if (m_FuncTpl == null)
            {
                EB.Debug.LogWarning("Can Not Find Func = {0}", m_FuncId);
                return;
            }

            OnLevelChange(null);

            string iconName = m_FuncTpl.iconName;

            if (m_FuncTpl.iconName.Contains("Icons_Renwu"))
            {
                iconName = m_FuncTpl.iconName.Replace("Renwu", "Renwu2");
            }
            else if (m_FuncTpl.iconName.Contains("Icons_Huoban"))
            {
                iconName = m_FuncTpl.iconName.Replace("Huoban", "Huoban2");
            }

            m_Sprite.spriteName = iconName;
            LTUIUtil.SetText(m_Label, m_FuncTpl.display_name);
            UIButton btn = m_Sprite.GetComponent <UIButton>();

            if (btn != null)
            {
                btn.normalSprite = iconName;

                if (IsNpcFunc)
                {
                    btn.onClick.Add(new EventDelegate(OnNpcFuncBtnClick));
                }
                else
                {
                    if (btn.onClick.Count == 0)
                    {
                        btn.onClick.Add(new EventDelegate(OnBtnClick));
                    }
                }
            }

            DoCondition();

            if (IsDayLimitOpenFunc)
            {
                Messenger.AddListener(Hotfix_LT.EventName.FuncOpenBtnReflash, OnReflash);
            }
        }
Exemple #21
0
            public void Fill(NationMember data)
            {
                IconSprite.spriteName = data.Portrait;
                LTUIUtil.SetText(NameLabel, data.Name);
                LTUIUtil.SetText(LevelLabel, data.Level.ToString());
                GameObject rootGO = NameLabel.transform.parent.gameObject;

                rootGO.SetActive(true);
                UITweener uit = rootGO.GetComponent <UITweener>();

                uit.ResetToBeginning();
                uit.PlayForward();
            }
Exemple #22
0
        public void OnMaxBtnClick()
        {
            LTUIUtil.SetText(TransNumLabel, Mathf.Min(sourceNum / transNum, BalanceResourceUtil.MaxNum).ToString());
            PlusBtn.color = Color.magenta;
            int useNum = int.Parse(TransNumLabel.text);

            if (useNum > 0)
            {
                SubBtn.color    = Color.white;
                UseButton.color = Color.white;
                UseButton.GetComponent <BoxCollider>().enabled = true;
            }
        }
Exemple #23
0
 public override void Fill(RecoverVigorItemData itemData)
 {
     if (itemData != null)
     {
         curData = itemData;
         int count = GameItemUtil.GetInventoryItemNum(curData.itemdataId, out inventoryid);
         lTShowItem.LTItemData = new LTShowItemData(curData.itemdataId, count, LTShowItemType.TYPE_GAMINVENTORY);
         addvigor.text         = string.Format("+{0}", itemData.vigor);
         showdata.count        = itemData.vigor;
         LTUIUtil.SetGreyButtonEnable(useitemBtn, count > 0);
         mask.CustomSetActive(count <= 0);
     }
 }
Exemple #24
0
 public void SetData(Data.ClimingTowerTemplate data, int type)
 {
     v_LayerLabel.gameObject.CustomSetActive(data != null);
     v_Door.gameObject.CustomSetActive(true);
     v_DoorEffet.gameObject.CustomSetActive(false);
     if (data != null)
     {
         int point = type == 0 ? data.normal_record : data.diff_record;
         LTUIUtil.SetText(v_LayerLabel, "+" + point);
         v_Door.gameObject.CustomSetActive(!data.v_CanChallenge);
         v_DoorEffet.gameObject.CustomSetActive(data.v_CanChallenge);
     }
 }
Exemple #25
0
 public void Fill(NationScore scoreData)
 {
     if (scoreData != null)
     {
         LTUIUtil.SetText(NameLabel, NationUtil.LocalizeNationName(scoreData.Name));
         LTUIUtil.SetText(ScoreLabel, scoreData.Score.ToString());
     }
     else
     {
         LTUIUtil.SetText(NameLabel, EB.Localizer.GetString("ID_codefont_in_NationBattleScoreBoardCell_431"));
         LTUIUtil.SetText(ScoreLabel, "");
     }
 }
Exemple #26
0
        private void OnInfoListener(string path, INodeData data)
        {
            int    residueTransferNum = AllianceEscortUtil.GetResidueTransferDartNum();
            string colorStr           = residueTransferNum > 0 ? LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal;

            LTUIUtil.SetText(controller.UiLabels["ResidueTransferDartNumLabel"], string.Format(EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_2955"), colorStr, residueTransferNum));

            int    residueRobNum = AllianceEscortUtil.GetResidueRobDartNum();
            string cs            = residueRobNum > 0 ? LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal;

            LTUIUtil.SetText(controller.UiLabels["ResidueRobNumLabel"], string.Format(EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_3223"), cs, residueRobNum));

            RefreshBtnState();
        }
Exemple #27
0
 /// <summary>
 /// 设置玩家信息
 /// </summary>
 /// <param name="selfInfo">我的信息</param>
 /// <param name="otherInfo">对手的信息</param>
 private void SetPlayerInfo(SidePlayerInfoData selfInfo, SidePlayerInfoData otherInfo)
 {
     LTUIUtil.SetText(selfNameLabel, selfInfo.name);
     LTUIUtil.SetText(OtherNameLabel, otherInfo.name);
     m_LevelInfo[0].F_SetInfo(selfInfo);
     m_LevelInfo[1].F_SetInfo(otherInfo);
     //
     LTUIUtil.SetText(selfLevelLabel, BalanceResourceUtil.GetUserLevel().ToString() /*data.selfInfo.level.ToString()*/);
     LTUIUtil.SetText(otherLevelLabel, otherInfo.level.ToString());
     selfHeadIconSpt.spriteName   = LTMainHudManager.Instance.UserHeadIcon;
     selfFrameIconSpt.spriteName  = LTMainHudManager.Instance.UserLeaderHeadFrame.iconId;
     otherHeadIconSpt.spriteName  = otherInfo.portrait;
     otherFrameIconSpt.spriteName = otherInfo.frame;
 }
Exemple #28
0
        public override void SetMenuData(object param)
        {
            base.SetMenuData(param);

            Hashtable ht = param as Hashtable;

            mEventId  = int.Parse(ht["eventId"].ToString());
            mCallBack = ht["cb"] as System.Action;
            Hotfix_LT.Data.NationSpecialEventTemplate tpl = Hotfix_LT.Data.EventTemplateManager.Instance.GetNationSpecialEventTpl(mEventId);
            if (tpl != null)
            {
                LTUIUtil.SetText(TipsLabel, tpl.desc);
            }
        }
Exemple #29
0
 IEnumerator CountdownBattleEndTime()
 {
     while (true)
     {
         bool isEnd;
         LTUIUtil.SetText(CombatCountdownTimeLabel, NationManager.Instance.BattleTimeConfig.GetCountDownStr(out isEnd));
         if (isEnd)
         {
             GlobalMenuManager.Instance.Open("LTNationBattleResultUI");
             yield break;
         }
         yield return(new WaitForSeconds(1f));
     }
 }
Exemple #30
0
        void OnTerritoryListListener(string path, INodeData data)
        {
            NationTerritoryList territoryData = data as NationTerritoryList;

            if (!territoryData.Updated)
            {
                return;
            }

            for (var i = 0; i < NationManager.Instance.List.Members.Count; i++)
            {
                var nation          = NationManager.Instance.List.Members[i];
                int territory_count = System.Array.FindAll(NationManager.Instance.TerritoryList.TerritoryList, m => m.Owner == nation.Name).Length;
                nation.Occupancy = (float)territory_count / NationManager.Instance.TerritoryList.TerritoryList.Length;
            }

            for (var i = 0; i < OccupancyEntrys.Length; i++)
            {
                var        entry      = OccupancyEntrys[i];
                NationData nationData = NationManager.Instance.List.Find(entry.natinName);
                LTUIUtil.SetText(entry.percentLabel, (nationData.Occupancy * 100) + "%");
                entry.progressBar.value = nationData.Occupancy;
            }

            float myNationOccupancy = NationManager.Instance.List.Find(NationManager.Instance.Account.NationName).Occupancy;

            Hotfix_LT.Data.NationRatingRewardTemplate ratingReward = Hotfix_LT.Data.EventTemplateManager.Instance.GetNationRatingRewardTpl((int)(myNationOccupancy * 100));
            if (ratingReward != null)
            {
                for (int fillIndex = 0; fillIndex < CombatRewardShowItems.Length; ++fillIndex)
                {
                    if (fillIndex < ratingReward.rewardDatas.Count)
                    {
                        CombatRewardShowItems[fillIndex].LTItemData = ratingReward.rewardDatas[fillIndex];
                    }
                    else
                    {
                        CombatRewardShowItems[fillIndex].mDMono.gameObject.SetActive(false);
                    }
                }
            }
            else
            {
                //Debug.Log("Hotfix_LT.Data.NationRatingRewardTemplate is null for Occupancy=" + myNationOccupancy);
                for (int fillIndex = 0; fillIndex < CombatRewardShowItems.Length; ++fillIndex)
                {
                    CombatRewardShowItems[fillIndex].mDMono.gameObject.SetActive(false);
                }
            }
        }