private void OnBtnGet(GameObject go) { List <EveryDayInfo> loginWelfareList = SignInManager.Instance.loginWelfareList; int num = 0; int num2 = 0; if (loginWelfareList != null && loginWelfareList.get_Count() > 0) { for (int i = 0; i < loginWelfareList.get_Count(); i++) { if (loginWelfareList.get_Item(i).status == 1) { num = loginWelfareList.get_Item(i).loginDays; break; } if (loginWelfareList.get_Item(i).status == 2) { num2 = loginWelfareList.get_Item(i).loginDays; } } } if (num > 0) { SignInManager.Instance.SendGetLoginWelfareReq(num); } else { string text = GameDataUtils.GetChineseContent(502215, false); num2++; if (num2 > 7) { return; } text = text.Replace("xx", num2.ToString()); UIManagerControl.Instance.ShowToastText(text); } }
public void SetData(FashionData fashionInformation, bool isShowHighLight) { this.fashionDataID = fashionInformation.dataID; ShiZhuangXiTong shiZhuangXiTong = DataReader <ShiZhuangXiTong> .Get(fashionInformation.dataID); if (DataReader <Items> .Contains(shiZhuangXiTong.itemsID)) { Items items = DataReader <Items> .Get(shiZhuangXiTong.itemsID); this.SetIcon(items); this.SetName(GameDataUtils.GetChineseContent(items.name, false)); this.SetLevel(GameDataUtils.GetChineseContent(items.describeId2, false)); this.SetTimeLimit(this.GetTimeStringByTimeout(fashionInformation.state, fashionInformation.time)); this.SetState(fashionInformation.state); this.SetMask(this.GetIsMaskOn(fashionInformation.state)); } else { this.SetName(string.Empty); this.SetLevel(string.Empty); this.SetTimeLimit(string.Empty); this.SetState(FashionData.FashionDataState.None); this.SetMask(true); } if (isShowHighLight) { if (this.highLightFxID == 0) { this.highLightFxID = FXSpineManager.Instance.PlaySpine(603, base.get_transform(), "FashionUI", 3010, null, "UI", 0f, -3f, 1.1f, 1.2f, true, FXMaskLayer.MaskState.None); } } else { FXSpineManager.Instance.DeleteSpine(this.highLightFxID, true); this.highLightFxID = 0; } }
private void OnShowRewards(GameObject go) { if (GuildBossManager.Instance.GuildBossActivityInfo == null || !GuildBossManager.Instance.GuildBossActivityInfo.IsChallenging || GuildBossManager.Instance.GuildBossActivityInfo.GuildBossID == 0) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(515085, false)); return; } int guildBossID = GuildBossManager.Instance.GuildBossActivityInfo.GuildBossID; if (DataReader <JunTuanBOSSMoXing> .Get(guildBossID) == null) { return; } List <int> list = new List <int>(); List <long> list2 = new List <long>(); int num = this.guildBossHurtRankingList.FindIndex((Transform a) => a == go.get_transform().get_parent()); if (num >= 0 && num <= 3) { List <KeyValuePair <int, int> > rewardListByRank = GuildBossManager.Instance.GetRewardListByRank(num); if (rewardListByRank != null && rewardListByRank.get_Count() > 0) { for (int i = 0; i < rewardListByRank.get_Count(); i++) { KeyValuePair <int, int> keyValuePair = rewardListByRank.get_Item(i); list.Add(keyValuePair.get_Key()); list2.Add((long)keyValuePair.get_Value()); } if (list.get_Count() > 0) { RewardUI rewardUI = LinkNavigationManager.OpenRewardUI(UINodesManager.MiddleUIRoot); rewardUI.get_transform().SetAsLastSibling(); rewardUI.SetRewardItem(GameDataUtils.GetChineseContent(513163, false), list, list2, true, true, null, null); } } } }
private void TeleportToCity(int cityID) { if (CityManager.Instance.CurrentCityID == cityID) { EventDispatcher.Broadcast <int>(CityManagerEvent.ChangeCityByIntegrationHearth, cityID); } else if (!this.IsTeleportOn(cityID)) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(517001, false)); if (this.mPreviousTeleport != null) { this.mPreviousTeleport.SetIsSelected(false); } } else { string content = string.Format("是否确定传送到{0}", RadarManager.Instance.GetSceneName(cityID)); DialogBoxUIViewModel.Instance.ShowAsOKCancel("快速传送", content, delegate { this.SetSelected(); }, delegate { if (CityManager.Instance.CurrentCityID == cityID) { EventDispatcher.Broadcast <int>(CityManagerEvent.ChangeCityByIntegrationHearth, cityID); return; } RadarManager.Instance.StopNav(); this.SetSelected(); EventDispatcher.Broadcast <int>(CityManagerEvent.ChangeCityByIntegrationHearth, cityID); }, GameDataUtils.GetChineseContent(505113, false), GameDataUtils.GetChineseContent(505114, false), "button_orange_1", "button_yellow_1", null, true, true); DialogBoxUIView.Instance.MaskAction = delegate { this.SetSelected(); }; } }
public void UpdateUI(Runes_basic runeStoneData, int skillID) { if (!this.isInit) { this.InitUI(); } this.runeStoneCfgData = runeStoneData; if (this.runeStoneCfgData == null) { return; } this.IsUnLock = SkillRuneManager.Instance.CheckRuneStoneIsUnLock(this.runeStoneCfgData.id); this.lockImgObj.SetActive(!this.IsUnLock); this.unLockImgObj.SetActive(this.IsUnLock); if (this.iconImg != null) { ResourceManager.SetSprite(this.iconImg, GameDataUtils.GetIcon(runeStoneData.icon)); int skillEmbedGroupIndex = SkillRuneManager.Instance.GetSkillEmbedGroupIndex(skillID); this.iconImg.set_color(new Color(this.iconImg.get_color().r, this.iconImg.get_color().b, this.iconImg.get_color().g, 1f)); if (this.IsUnLock && skillEmbedGroupIndex != this.runeStoneCfgData.runesGroup) { this.iconImg.set_color(new Color(this.iconImg.get_color().r, this.iconImg.get_color().b, this.iconImg.get_color().g, 1f)); ImageColorMgr.SetImageColor(this.iconImg, true); } else if (this.IsUnLock && skillEmbedGroupIndex == this.runeStoneCfgData.runesGroup) { this.iconImg.set_color(new Color(this.iconImg.get_color().r, this.iconImg.get_color().b, this.iconImg.get_color().g, 1f)); ImageColorMgr.SetImageColor(this.iconImg, false); } else if (!this.IsUnLock) { ImageColorMgr.SetImageColor(this.iconImg, false); this.iconImg.set_color(new Color(this.iconImg.get_color().r, this.iconImg.get_color().b, this.iconImg.get_color().g, 0.5f)); } } this.runeStoneNameText.set_text(string.Empty); }
public void UpdateUIData(MultiPvpDailyRewardInfoNty.MultiPvpRewardInfo rewardInfo) { if (!this.isInit) { this.InitUI(); } this.m_rewardInfo = rewardInfo; int rewardId = rewardInfo.rewardId; bool getFlag = rewardInfo.getFlag; FXSpineManager.Instance.DeleteSpine(this.rewardIconFXID, true); if (DataReader <PVPMeiRiJiangLi> .Contains(rewardId)) { PVPMeiRiJiangLi pVPMeiRiJiangLi = DataReader <PVPMeiRiJiangLi> .Get(rewardId); int num = (pVPMeiRiJiangLi.completeTarget.get_Count() < 2) ? 0 : pVPMeiRiJiangLi.completeTarget.get_Item(1); int num2 = (rewardInfo.process < num) ? rewardInfo.process : num; this.rewardTypeDesc.set_text(GameDataUtils.GetChineseContent(pVPMeiRiJiangLi.name, false)); this.rewardTargetDesc.set_text(string.Format(GameDataUtils.GetChineseContent(pVPMeiRiJiangLi.state, false), num2, num)); if (num2 >= num) { this.isCanGet = true; } if (getFlag) { ResourceManager.SetSprite(this.rewardIcon, GameDataUtils.GetIcon(1603)); } else { ResourceManager.SetSprite(this.rewardIcon, GameDataUtils.GetIcon(pVPMeiRiJiangLi.icon)); } if (this.isCanGet && !getFlag) { this.rewardIconFXID = FXSpineManager.Instance.ReplaySpine(this.rewardIconFXID, 610, this.rewardIcon.get_transform(), "MultiPVPUI", 2001, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None); } } }
public void SetShowType(RewardPreviewUI.CopyType type) { this.mCopyType = type; this.SetDafaultUI(); switch (type) { case RewardPreviewUI.CopyType.EXP: case RewardPreviewUI.CopyType.HOOK: this.mTxTitle.set_text(GameDataUtils.GetChineseContent(511608, false)); this.mTxExpBatch.set_text(GameDataUtils.GetChineseContent(511609, false)); this.mTxExp.get_gameObject().SetActive(true); break; case RewardPreviewUI.CopyType.GUARD: case RewardPreviewUI.CopyType.ESCORT: case RewardPreviewUI.CopyType.ATTACK: this.mTxTitle.set_text("已获得奖励"); this.RefreshReward(type); break; case RewardPreviewUI.CopyType.GUILDWAR: { this.mTxExp.set_fontSize(32); this.mTxTitle.set_text("已采集资源"); this.mTxExpBatch.set_text(string.Empty); this.mTxExp.get_gameObject().SetActive(true); this.mTxExpBatchNum.set_text(string.Empty); Icon icon = DataReader <Icon> .Get(5611); if (icon != null) { this.SetIconImage(icon.icon); } break; } } }
private void OnClickChangeArena(GameObject go) { int num = this.arenaBtnList.FindIndex((Transform a) => a.get_gameObject() == go); if (num >= 0) { JJingYingFuBenQuYu jJingYingFuBenQuYu = DataReader <JJingYingFuBenQuYu> .Get(num + 1); if (jJingYingFuBenQuYu != null) { int level = jJingYingFuBenQuYu.level; if (EntityWorld.Instance.EntSelf.Lv < level) { string text = string.Format(GameDataUtils.GetChineseContent(505075, false), level); UIManagerControl.Instance.ShowToastText(text); return; } } if (!EliteDungeonManager.Instance.EliteMapInfoDic.ContainsKey(num + 1) || !EliteDungeonManager.Instance.EliteMapInfoDic.get_Item(num + 1).openFlag) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(505026, false)); return; } this.CurrentIndex = num; if (this.LastIndex == this.CurrentIndex) { return; } if (this.LastIndex >= 0 && this.LastIndex < this.arenaBtnList.get_Count()) { this.arenaBtnList.get_Item(this.LastIndex).get_transform().FindChild("ClickImage").get_gameObject().SetActive(false); } this.arenaBtnList.get_Item(num).get_transform().FindChild("ClickImage").get_gameObject().SetActive(true); this.LastIndex = this.CurrentIndex; this.OnClickMapBtn(this.CurrentIndex + 1); } }
private void Awake() { base.AwakeBase(BindingContext.BindingContextMode.MonoBinding, false); this.FashionPreviewCellBG = base.GetComponent <Image>(); this.FashionPreviewCellModelProjection = base.FindTransform("FashionPreviewCellModelProjection").GetComponent <RawImage>(); this.FashionPreviewCellTitle = base.FindTransform("FashionPreviewCellTitle").get_gameObject(); this.FashionPreviewCellTitleName = base.FindTransform("FashionPreviewCellTitleName").GetComponent <Text>(); this.FashionPreviewCellTitleLimitMark = base.FindTransform("FashionPreviewCellTitleLimitMark").get_gameObject(); this.FashionPreviewCellCondition = base.FindTransform("FashionPreviewCellCondition"); this.FashionPreviewCellConditionText = base.FindTransform("FashionPreviewCellConditionText").GetComponent <Text>(); this.FashionPreviewCellConditionSlot0 = base.FindTransform("FashionPreviewCellConditionSlot0"); this.FashionPreviewCellConditionSlot1 = base.FindTransform("FashionPreviewCellConditionSlot1"); this.FashionPreviewCellAttr = base.FindTransform("FashionPreviewCellAttr"); this.FashionPreviewCellAttrSlot0 = base.FindTransform("FashionPreviewCellAttrSlot0"); this.FashionPreviewCellAttrSlot1 = base.FindTransform("FashionPreviewCellAttrSlot1"); this.FashionPreviewCellAttrText0 = base.FindTransform("FashionPreviewCellAttrText0").GetComponent <Text>(); this.FashionPreviewCellAttrText1 = base.FindTransform("FashionPreviewCellAttrText1").GetComponent <Text>(); this.FashionPreviewCellDressBtn = base.FindTransform("FashionPreviewCellDressBtn").get_gameObject(); this.FashionPreviewCellUndressBtn = base.FindTransform("FashionPreviewCellUndressBtn").get_gameObject(); this.FashionPreviewCellRenewalBtn = base.FindTransform("FashionPreviewCellRenewalBtn").get_gameObject(); this.FashionPreviewCellBuyBtn = base.FindTransform("FashionPreviewCellBuyBtn").get_gameObject(); this.FashionPreviewCellDressBtnText = base.FindTransform("FashionPreviewCellDressBtnText").GetComponent <Text>(); this.FashionPreviewCellUndressBtnText = base.FindTransform("FashionPreviewCellUndressBtnText").GetComponent <Text>(); this.FashionPreviewCellRenewalBtnText = base.FindTransform("FashionPreviewCellRenewalBtnText").GetComponent <Text>(); this.FashionPreviewCellBuyBtnText = base.FindTransform("FashionPreviewCellBuyBtnText").GetComponent <Text>(); EventTriggerListener expr_1CF = EventTriggerListener.Get(base.get_gameObject()); expr_1CF.onDrag = (EventTriggerListener.VoidDelegateData)Delegate.Combine(expr_1CF.onDrag, new EventTriggerListener.VoidDelegateData(this.OnDragModel)); this.FashionPreviewCellDressBtn.GetComponent <Button>().get_onClick().AddListener(new UnityAction(this.OnClickDressBtn)); this.FashionPreviewCellUndressBtn.GetComponent <Button>().get_onClick().AddListener(new UnityAction(this.OnClickUndressBtn)); this.FashionPreviewCellRenewalBtn.GetComponent <Button>().get_onClick().AddListener(new UnityAction(this.OnClickRenewalBtn)); this.FashionPreviewCellBuyBtn.GetComponent <Button>().get_onClick().AddListener(new UnityAction(this.OnClickBuyBtn)); this.FashionPreviewCellDressBtnText.set_text(GameDataUtils.GetChineseContent(1005007, false)); this.FashionPreviewCellUndressBtnText.set_text(GameDataUtils.GetChineseContent(1005008, false)); this.FashionPreviewCellRenewalBtnText.set_text(GameDataUtils.GetChineseContent(1005009, false)); this.FashionPreviewCellBuyBtnText.set_text(GameDataUtils.GetChineseContent(1005015, false)); }
public void SetRewardItems(List <DropItem> listDrops, int time) { string text = GameDataUtils.GetChineseContent(505124, false); text = text.Replace("xx", time.ToString()); this.TextTitle.set_text(text); this.TextExpNum.set_text("0"); this.TextGoldNum.set_text("0"); for (int i = 0; i < listDrops.get_Count(); i++) { DropItem dropItem = listDrops.get_Item(i); if (dropItem.typeId == 1) { ResourceManager.SetSprite(this.ImageExp, GameDataUtils.GetIcon(DataReader <Items> .Get(dropItem.typeId).littleIcon)); this.TextExpNum.set_text("+" + dropItem.count.ToString()); } else if (dropItem.typeId == 2) { ResourceManager.SetSprite(this.ImageGold, GameDataUtils.GetIcon(DataReader <Items> .Get(dropItem.typeId).littleIcon)); this.TextGoldNum.set_text("+" + dropItem.count.ToString()); } else { GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("InstanceRewardItem"); instantiate2Prefab.get_transform().FindChild("Text").GetComponent <Text>().set_text(dropItem.count.ToString()); Items items = DataReader <Items> .Get(dropItem.typeId); ResourceManager.SetSprite(instantiate2Prefab.get_transform().FindChild("ImageIcon").GetComponent <Image>(), GameDataUtils.GetItemIcon(items.id)); ResourceManager.SetSprite(instantiate2Prefab.get_transform().FindChild("ImageFrame").GetComponent <Image>(), GameDataUtils.GetItemFrame(items.id)); instantiate2Prefab.get_transform().SetParent(this.Grid.get_transform()); instantiate2Prefab.GetComponent <RectTransform>().set_localScale(Vector3.get_one()); instantiate2Prefab.GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickInstanceRewardItem); instantiate2Prefab.set_name(dropItem.typeId.ToString()); this.listItem.Add(instantiate2Prefab); } } }
public static string GetTaskName(ZhuanZhiRenWu dataRW) { string result = string.Empty; if (dataRW.missionType == 1) { if (dataRW.missionData.get_Count() >= 1) { ZhuXianPeiZhi zhuXianPeiZhi = DataReader <ZhuXianPeiZhi> .Get(dataRW.missionData.get_Item(0)); if (zhuXianPeiZhi != null) { result = string.Format(dataRW.message, GameDataUtils.GetChineseContent(zhuXianPeiZhi.name, false)); } } } else if (dataRW.missionType == 2) { result = dataRW.message; } else if (dataRW.missionType == 3) { if (dataRW.missionData.get_Count() >= 2) { result = string.Format(dataRW.message, GemGlobal.GetGemName(dataRW.missionData.get_Item(0), dataRW.missionData.get_Item(1))); } } else if (dataRW.missionType == 4) { result = dataRW.message; } else if (dataRW.missionType == 5 && dataRW.missionData.get_Count() >= 1) { result = string.Format(dataRW.message, dataRW.missionData.get_Item(0)); } return(result); }
public string GetArtifactNameLockTipByID(int id) { ArtifactSkill artifactSkillCfgDataByID = this.GetArtifactSkillCfgDataByID(id); if (artifactSkillCfgDataByID == null) { return(string.Empty); } string result = string.Empty; int activation = artifactSkillCfgDataByID.activation; if (activation > 0) { Artifact artifact = DataReader <Artifact> .Get(activation); string text = string.Empty; if (artifact != null) { text = GameDataUtils.GetChineseContent(artifact.name, false); } result = string.Format(GameDataUtils.GetChineseContent(518005, false), text); } return(result); }
public void RefreshUI(MemberResume memberResume) { this.m_memberResume = memberResume; if (!this.isInit) { this.InitUI(); } bool flag = memberResume != null; if (this.noMemberObj.get_activeSelf() == flag) { this.noMemberObj.SetActive(!flag); } if (this.haveMemberObj.get_activeSelf() != flag) { this.haveMemberObj.SetActive(flag); } if (this.m_memberResume != null) { ResourceManager.SetSprite(this.headIconImg, UIUtils.GetRoleSmallIcon((int)memberResume.career)); this.roleNameText.set_text(memberResume.name); this.roleLvText.set_text("Lv." + memberResume.level + string.Empty); this.roleFightingText.set_text(memberResume.fighting + string.Empty); if (TeamBasicManager.Instance.MyTeamData != null && TeamBasicManager.Instance.MyTeamData.LeaderID == memberResume.roleId) { this.leadIconImg.set_enabled(true); } else { this.leadIconImg.set_enabled(false); } ResourceManager.SetSprite(this.m_spVIPLevel1Img, GameDataUtils.GetNumIcon10(memberResume.vipLv, NumType.Yellow_light)); ResourceManager.SetSprite(this.m_spVIPLevel2Img, GameDataUtils.GetNumIcon10(memberResume.vipLv, NumType.Yellow_light)); } this.SetButtonVisible(); }
public override void ShowBattleUI() { if (base.InstanceResult != null) { return; } BattleUI battleUI = LinkNavigationManager.OpenBattleUI(); battleUI.BtnQuitAction = delegate { UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush); GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetChineseContent(510109, false), GameDataUtils.GetChineseContent(505191, false), delegate { }, delegate { WildBossManager.Instance.InitiativeQuit(); }, GameDataUtils.GetChineseContent(621272, false), GameDataUtils.GetChineseContent(621271, false), "button_orange_1", "button_yellow_1", null, true); GlobalBattleDialogUIView.Instance.isClick = false; }; battleUI.ResetAllInstancePart(); battleUI.ShowBattleTimeUI(true); battleUI.IsPauseCheck = false; battleUI.IsInAuto = (base.InstanceData.autoFight == 0); }
public void SetData(DailyTask task, DailyTaskType type, bool isGoldBuy, Action <DailyTaskItem> clickCallBack = null) { this.mTask = task; this.mType = type; this.mEventHandler = clickCallBack; this.mDailyData = DataReader <MeiRiMuBiao> .Get(this.mTask.taskId); if (this.mDailyData != null) { if (this.mFxId > 0) { FXSpineManager.Instance.DeleteSpine(this.mFxId, true); this.mFxId = 0; } if (this.mDailyData.Retrieve == 1) { this.mFindData = DataReader <MZhaoHui> .Get(this.mTask.taskId); } ResourceManager.SetSprite(this.mIcon, GameDataUtils.GetIcon(this.mDailyData.iconId)); this.mTxName.set_text(GameDataUtils.GetChineseContent(this.mDailyData.introduction1, false)); switch (this.mType) { case DailyTaskType.DAILY: this.SetDailyData(this.mDailyData); break; case DailyTaskType.FIND: this.SetFindData(this.mFindData, isGoldBuy); break; case DailyTaskType.LIMIT: this.SetTimeData(this.mDailyData); break; } } }
private void DoCheckVersion() { this.serverVersions = this.GetServerVersions(); if (int.Parse(this.serverVersions[0]) < 0) { Debug.LogError("GetServerVersions Failure!serverVersions[0]: " + this.serverVersions[0]); NewContinueUI.OpenAsNormal(GameDataUtils.GetChineseContent(621283, false), GameDataUtils.GetChineseContent(621284, false), new Action(this.DownloadSeverVersion), new Action(ClientApp.QuitApp), GameDataUtils.GetChineseContent(621285, false), GameDataUtils.GetChineseContent(621286, false)); return; } this.clientVersions = this.GetLocalVersions(); if (int.Parse(this.clientVersions[2]) < 0) { Debug.LogError("GetLocalVersions Failure!clientVersions[0]: " + this.clientVersions[0]); NewContinueUI.OpenAsNormal(GameDataUtils.GetChineseContent(621283, false), GameDataUtils.GetChineseContent(621296, false), new Action(this.Awake), new Action(ClientApp.QuitApp), GameDataUtils.GetChineseContent(621285, false), GameDataUtils.GetChineseContent(621286, false)); return; } if (int.Parse(this.clientVersions[0]) < int.Parse(this.serverVersions[0])) { NewContinueUI.OpenAsNormal(GameDataUtils.GetChineseContent(621297, false), GameDataUtils.GetChineseContent(621298, false), new Action(this.DownloadInstallPackage), new Action(ClientApp.QuitApp), GameDataUtils.GetChineseContent(621289, false), GameDataUtils.GetChineseContent(621290, false)); return; } if (this.clientVersions[2] == "0") { DownloaderManager.Instance.DowanloadUpdatePackage(1, 0, null, new Action <bool>(this.GetIndexFileSize), false, false); return; } if (int.Parse(this.clientVersions[2]) <= int.Parse(this.serverVersions[2]) && int.Parse(this.clientVersions[3]) < int.Parse(this.serverVersions[3])) { DownloaderManager.Instance.DowanloadUpdatePackage(0, int.Parse(this.serverVersions[3]), null, new Action <bool>(this.GetIndexFileSize), false, false); } else { TimerHeap.DelTimer(this.t); this.OnResourceInited(); } }
public void OnSecondPass() { TimeSpan timeSpan = BountyManager.Instance.Countdown - TimeManager.Instance.PreciseServerTime; if (this.quality == 5) { this.TextTips.set_text(GameDataUtils.GetChineseContent(513652, false)); this.ButtonRefresh.get_gameObject().SetActive(false); this.Tips.SetActive(false); } else if (timeSpan.get_TotalSeconds() > 0.0) { if (timeSpan.get_Days() > 0) { string text = timeSpan.get_Days() * 24 + timeSpan.get_Hours() + ":" + timeSpan.get_Minutes(); this.TextTips.set_text(string.Format(GameDataUtils.GetChineseContent(513606, false), text)); } else { this.TextTips.set_text(string.Format(GameDataUtils.GetChineseContent(513606, false), Convert.ToDateTime(timeSpan.ToString()).ToString("HH:mm"))); } this.TextTips.get_gameObject().SetActive(true); this.Tips.SetActive(false); this.ButtonRefresh.get_gameObject().SetActive(true); } else { this.TextTips.set_text(GameDataUtils.GetChineseContent(513651, false)); this.ButtonRefresh.get_gameObject().SetActive(true); this.Tips.SetActive(true); } if (this.StarBoxHasGot.get_activeSelf() && BountyManager.Instance.BoxStarCountdown > TimeManager.Instance.PreciseServerTime) { this.StarBoxCountdown.set_text(string.Format(GameDataUtils.GetChineseContent(513647, false), Convert.ToDateTime((BountyManager.Instance.BoxStarCountdown - TimeManager.Instance.PreciseServerTime).ToString()).ToString("HH:mm:ss"))); } }
protected override void InitUI() { base.InitUI(); base.FindTransform("BtnRefresh").GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickRefresh); base.FindTransform("BtnCreate").GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickCreateBtn); this.btnQuickEnter = base.FindTransform("BtnQuick").GetComponent <ButtonCustom>(); this.btnQuickEnter.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnQuick); base.FindTransform("BtnQuick").FindChild("Text").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(50735, false)); base.FindTransform("BtnCreate").FindChild("Text").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(50726, false)); base.FindTransform("BtnRefresh").FindChild("Text").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(505183, false)); this.noTeamTipText = base.FindTransform("NoTeamTipText").GetComponent <Text>(); this.btnListPool = base.FindTransform("TeamFirstTypeTab").GetComponent <ListPool>(); base.FindTransform("ListViewTeamInfo").GetComponent <ScrollRectCustom>().onDrag = delegate(PointerEventData data) { float verticalNormalizedPosition = base.FindTransform("ListViewTeamInfo").GetComponent <ScrollRectCustom>().verticalNormalizedPosition; if (verticalNormalizedPosition <= 0f && !this.haseRequire) { if (TeamBasicManager.Instance.CanNotRequire) { return; } this.haseRequire = true; this.currentPage++; if (this.currentBtnTypeItem != null) { this.OnSendQueryTeamInfo(this.currentBtnTypeItem.DungeonType, this.currentBtnTypeItem.DungeonParams); } } }; this.btnListPool.Clear(); this.noTeamTipText.set_text(GameDataUtils.GetChineseContent(516128, false)); if (this.noTeamTipText != null && this.noTeamTipText.get_gameObject().get_activeSelf()) { this.noTeamTipText.get_gameObject().SetActive(false); } }
public void UpdateItem(GrowUpPlanDataUnite itemData) { this.typeId = itemData.typeId; this.roleLv = itemData.condition; ResourceManager.SetSprite(this.imgIcon, GameDataUtils.GetItemIcon(itemData.itemId)); string text = "x" + itemData.count; this.textCount.set_text(text); string text2 = string.Format(GameDataUtils.GetChineseContent(513175, false), itemData.condition); this.textCondition.set_text(text2); int state = itemData.state; if (state == 1) { this.btnGet.get_gameObject().SetActive(true); this.btnGet.set_enabled(false); this.imgGrey.get_gameObject().SetActive(true); this.imgHaveGet.get_gameObject().SetActive(false); this.textBtnGet.set_text(GameDataUtils.GetChineseContent(513176, false)); } else if (state == 2) { this.btnGet.get_gameObject().SetActive(true); this.btnGet.set_enabled(true); this.imgGrey.get_gameObject().SetActive(false); this.imgHaveGet.get_gameObject().SetActive(false); this.textBtnGet.set_text(GameDataUtils.GetChineseContent(513177, false)); } else { this.btnGet.get_gameObject().SetActive(false); this.imgHaveGet.get_gameObject().SetActive(true); } base.get_transform().FindChild("BtnGet").GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickGet); }
private void OnClickCallBoss(GameObject go) { if (!GuildManager.Instance.CheckMemberHasPrivilege(GuildPrivilegeState.OpenGuildBoss)) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(515087, false)); return; } if (GuildManager.Instance.MyGuildnfo != null && GuildManager.Instance.MyGuildnfo.guildFund < this.callCostNum) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(515086, false)); return; } if (GuildBossManager.Instance.GuildBossActivityInfo == null || GuildBossManager.Instance.GuildBossActivityInfo.RemainCallBossTimes <= 0) { UIManagerControl.Instance.ShowToastText("本周今日召唤次数已用完------需提供中文字符ID"); return; } string content = string.Format(GameDataUtils.GetChineseContent(515088, false), this.guildBossCfgData.rank, this.callBossName, this.callCostNum); DialogBoxUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetChineseContent(621264, false), content, null, delegate { GuildBossManager.Instance.SendCallGuildBossReq(this.guildBossCfgData.bossId); }, "取 消", "确 定", "button_orange_1", "button_yellow_1", null, true, true); }
protected void OnUpdateDetailUI() { SpecialFightCommonTableData specialFightCommonTableData = SpecialFightManager.GetSpecialFightCommonTableData(this.currentMode); if (specialFightCommonTableData == null) { return; } Icon icon = DataReader <Icon> .Get(specialFightCommonTableData.picture); if (icon != null) { ResourceManager.SetTexture(this.InstanceRawImage, icon.icon); } for (int i = 0; i < this.DropInfoItem.get_childCount(); i++) { Object.Destroy(this.DropInfoItem.GetChild(i).get_gameObject()); } for (int j = 0; j < specialFightCommonTableData.itemIDs.get_Count(); j++) { ItemShow.ShowItem(this.DropInfoItem, specialFightCommonTableData.itemIDs.get_Item(j), (long)specialFightCommonTableData.itemNums.get_Item(j), false, null, 2001); } this.DescribtionContent.set_text(GameDataUtils.GetChineseContent(specialFightCommonTableData.descID, false)); }
public void Send(int channel2Client, string chatContent, List <DetailInfo> items, long targetId) { if (!string.IsNullOrEmpty(chatContent) || (items != null && items.get_Count() > 0)) { chatContent = this.FilterFacePlaceholder(chatContent, true); if (chatContent.get_Length() > ChatManager.MAX_NUM_2_CHAR) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(502064, false)); return; } if (this.FaceInfos.get_Count() > ChatManager.MAX_NUM_2_FACE) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(502063, false)); return; } string text2chat; WordFilter.filter(chatContent, out text2chat, 3, false, false, "*"); this.SendTalk(ChannelBit.Client2ServerChannel(channel2Client), text2chat, items, targetId, this.FaceInfos); } else { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(502061, false)); } }
protected string SetNameText(SpecialFightMode mode, int difficultyIndex, int difficultyLevel) { switch (mode) { case SpecialFightMode.Hold: case SpecialFightMode.Protect: return(string.Format(GameDataUtils.GetChineseContent(513500, false), difficultyLevel)); case SpecialFightMode.Save: switch (difficultyIndex) { case 0: return(GameDataUtils.GetChineseContent(513501, false)); case 1: return(GameDataUtils.GetChineseContent(513502, false)); case 2: return(GameDataUtils.GetChineseContent(513503, false)); } break; } return(string.Empty); }
public void UpdateItem2Checks() { this.Item2Checks.Clear(); List <Goods> bag = BackpackManager.Instance.Bag; for (int i = 0; i < bag.get_Count(); i++) { int itemId = bag.get_Item(i).GetItemId(); if (this.IsItemCanShow(itemId)) { Items items = DataReader <Items> .Get(itemId); if (items != null) { OOItem2Check oOItem2Check = new OOItem2Check(); oOItem2Check.id = items.id; oOItem2Check.Frame = GameDataUtils.GetItemFrame(items.id); oOItem2Check.Icon = GameDataUtils.GetIcon(items.icon); oOItem2Check.CheckVisibility = ChatUIViewModel.Instance.IsItemInShow(items.id); this.Item2Checks.Add(oOItem2Check); } } } }
private GameObject CreateRewards(int id, long value) { GameObject go = this.GetUnusedItem(); if (go == null) { go = ResourceManager.GetInstantiate2Prefab("TaskRewardItem"); go.GetComponent <Button>().get_onClick().AddListener(delegate { int num = int.Parse(go.get_name()); if (num != 1) { ItemTipUIViewModel.ShowItem(num, null); } }); UGUITools.SetParent(this.mRewardPanel, go, false); this.mRewardList.Add(go); } go.set_name(id.ToString()); ResourceManager.SetSprite(go.GetComponent <Image>(), GameDataUtils.GetItemFrame(id)); ResourceManager.SetSprite(go.get_transform().FindChild("Image").GetComponent <Image>(), GameDataUtils.GetItemIcon(id)); go.get_transform().FindChild("Text").GetComponent <Text>().set_text(Utils.SwitchChineseNumber(value, 1)); Items items = DataReader <Items> .Get(id); if (items == null || items.step <= 0) { go.get_transform().FindChild("ItemStep").get_gameObject().SetActive(false); } else { go.get_transform().FindChild("ItemStep").get_gameObject().SetActive(true); go.get_transform().FindChild("ItemStep").FindChild("ItemStepText").GetComponent <Text>().set_text(string.Format(GameDataUtils.GetChineseContent(505023, false), items.step)); } go.SetActive(true); return(go); }
public override void ShowBattleUI() { if (base.InstanceResult != null) { return; } BattleUI battleUI = LinkNavigationManager.OpenBattleUI(); battleUI.BtnQuitAction = delegate { UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush); GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetNoticeText(100), GameDataUtils.GetNoticeText(101), null, delegate { GuildBossManager.Instance.SendExitGuildBossBattleReq(); }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_yellow_1", null, true); GlobalBattleDialogUIView.Instance.isClick = true; }; battleUI.ResetAllInstancePart(); battleUI.ShowBattleTimeUI(true); battleUI.IsPauseCheck = false; battleUI.IsInAuto = (base.InstanceData.autoFight == 0); this.IsGetResult = false; GuildBossManager.Instance.CheckShowGuildBossBattleCD(); }
private void RandomTips() { string text = string.Empty; if (EntityWorld.Instance.EntSelf != null) { this.tipsIds.Clear(); List <DengJiDuan> dataList = DataReader <DengJiDuan> .DataList; for (int i = 0; i < dataList.get_Count(); i++) { if (EntityWorld.Instance.EntSelf.Lv >= dataList.get_Item(i).minLv&& EntityWorld.Instance.EntSelf.Lv <= dataList.get_Item(i).maxLv) { this.tipsIds.Add(dataList.get_Item(i).lvId); } } if (this.tipsIds.get_Count() == 0) { Debug.Log("tipsIds count == 0"); } if (this.tipsIds.get_Count() > 0) { int tipsId = this.tipsIds.get_Item(Random.Range(0, this.tipsIds.get_Count())); List <Tips> list = DataReader <Tips> .DataList.FindAll((Tips e) => e.lvId == tipsId); if (list.get_Count() == 0) { Debug.Log("tips count == 0"); } if (list.get_Count() > 0) { text = string.Format("<size=26>Tips:</size><size=22>{0}</size>", GameDataUtils.GetChineseContent(list.get_Item(Random.Range(0, list.get_Count())).tipsId, false)); } } } this.m_lblTipsDescText.set_text(text); }
private void CreateReward(DiaoLuo data) { this.mCurRewardCount++; if (this.mCurRewardCount > 2) { return; } Items item = BackpackManager.Instance.GetItem((data.goodsId != 3001) ? data.goodsId : 2010); if (item == null) { return; } GameObject gameObject = this.CreateRewardItem(); gameObject.set_name(data.goodsId.ToString()); Image image = UIHelper.GetImage(gameObject.get_transform(), "Image"); if (this.HaveIconId(data.goodsId)) { image.get_rectTransform().set_sizeDelta(new Vector2(50f, 50f)); } else { image.get_rectTransform().set_sizeDelta(new Vector2(40f, 40f)); } ResourceManager.SetSprite(image, GameDataUtils.GetIcon((item.id >= 5) ? item.icon : item.littleIcon)); string text = Utils.SwitchChineseNumber((long)this.mTask.canFindTimes * data.minNum, 1); if (item.id == 1) { text += "+"; } UIHelper.GetText(gameObject.get_transform(), "Text").set_text(text); gameObject.SetActive(true); }
private void OnRechargeSuccessNty(short state, RechargeSuccessNty down = null) { WaitUI.CloseUI(0u); if (state != 0) { StateManager.Instance.StateShow(state, 0); return; } if (down != null) { if (down.item.get_Count() > 0) { string text = string.Empty; for (int i = 0; i < down.item.get_Count(); i++) { if (i > 0) { text += ", "; } string text2 = text; text = string.Concat(new object[] { text2, GameDataUtils.GetItemName(down.item.get_Item(i).itemId, true, 0L), "x", down.item.get_Item(i).count }); } DialogBoxUIViewModel.Instance.ShowAsConfirm("充值成功", string.Format(down.info, text), null, "确定", "button_orange_1", null); } else { UIManagerControl.Instance.ShowToastText("激活成功"); } } }
private void OnClickBtnOneKeyCompose(GameObject go) { if (!GemGlobal.IsGemEnoughLv(this.rootTypeId)) { string text = string.Format(GameDataUtils.GetChineseContent(621005, false), new object[0]); UIManagerControl.Instance.ShowToastText(text, 2f, 2f); return; } List <MaterialGem> oneKeyComposeGems = GemGlobal.GetOneKeyComposeGems(GemUI.instance.equipCurr, GemUI.instance.slotCurr, this.rootTypeId); if (oneKeyComposeGems == null) { string text2 = string.Format(GameDataUtils.GetChineseContent(621010, false), new object[0]); UIManagerControl.Instance.ShowToastText(text2, 2f, 2f); return; } List <CostGem> list = new List <CostGem>(); using (List <MaterialGem> .Enumerator enumerator = oneKeyComposeGems.GetEnumerator()) { while (enumerator.MoveNext()) { MaterialGem current = enumerator.get_Current(); list.Add(new CostGem { gemId = current.gemId, gemNum = (uint)current.count }); } } GemManager.Instance.SendGemSysCompositeReq(this.rootTypeId, 2); if (this.IsComposeGemtoSlot(this.rootTypeId)) { this.CloseUI(); } }