public void SetDefaultBatchExpText(long batchNum) { if (this.mTxExpBatchNum != null) { this.mTxExpBatchNum.set_text(AttrUtility.GetExpValueStr(batchNum)); } }
public void Refresh() { this.mTxTitle.set_text(TramcarManager.Instance.TRAMCAR_NAME[this.Data.quality]); ResourceManager.SetSprite(this.mImgTask, ResourceManager.GetIconSprite("kuangche_" + this.Data.quality)); this.mBtnBast.get_gameObject().SetActive(this.Data.quality >= 5 && (VIPManager.Instance.IsVIPCardOn() || (EntityWorld.Instance.EntSelf.VipLv >= TramcarManager.Instance.BastTramcarVip && VIPManager.Instance.IsVIPPrivilegeOn()))); this.ClearReward(); List <DropItem> tramcarRewards = TramcarManager.Instance.TramcarRewards; if (tramcarRewards != null) { for (int i = 0; i < tramcarRewards.get_Count(); i++) { if (tramcarRewards.get_Item(i).typeId == 1) { this.mTxExp.set_text("经验:" + AttrUtility.GetExpValueStr(tramcarRewards.get_Item(i).count *(long)this.Data.parament / 100L)); } else if (tramcarRewards.get_Item(i).typeId == 2) { this.mTxGole.set_text("金币:" + AttrUtility.GetGoldValueStr(tramcarRewards.get_Item(i).count *(long)this.Data.parament / 100L)); } else { this.CreateRewards(tramcarRewards.get_Item(i).typeId, tramcarRewards.get_Item(i).count *(long)this.Data.parament / 100L); } } } }
public void SetDefaultExpText(long exp) { if (this.mTxExp != null) { this.mTxExp.set_text(AttrUtility.GetExpValueStr(exp)); } }
private void OnBatchChanged(int curBatch) { if (this.mCopyType != RewardPreviewUI.CopyType.EXP) { return; } if (curBatch <= 1) { return; } int num = curBatch - 1; long batchExp = SpecialFightManager.Instance.GetBatchExp(num); this.mTxExp.set_text(AttrUtility.GetExpValueStr(batchExp * (long)num)); this.mTxExpBatchNum.set_text(AttrUtility.GetExpValueStr(batchExp)); }
private GameObject CreateRewards(int id, long num) { GameObject go = this.GetUnusedItem(); if (go == null) { go = ResourceManager.GetInstantiate2Prefab("TaskRewardItem"); go.GetComponent <Button>().get_onClick().AddListener(delegate { int num2 = int.Parse(go.get_name()); if (num2 != 1) { ItemTipUIViewModel.ShowItem(num2, null); } }); UGUITools.SetParent(this.mGrid, go, false); this.mItems.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)); string text = num.ToString(); if (id == 1) { text = AttrUtility.GetExpValueStr(num); } else if (id == 2) { text = AttrUtility.GetGoldValueStr(num); } go.get_transform().FindChild("Text").GetComponent <Text>().set_text(text); 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 void RefreshBeginUI(OffLineMsgRes down) { string time = TimeConverter.GetTime(down.hasTime, TimeFormat.DHHMM_Chinese); this.textOffTime.set_text(string.Format(GameDataUtils.GetChineseContent(330024, false), time)); this.textLeftTimeValue.set_text(time); this.textLvValue.set_text(string.Format(GameDataUtils.GetChineseContent(330025, false), EntityWorld.Instance.EntSelf.Lv)); this.textNeedExpValue.set_text(string.Format(GameDataUtils.GetChineseContent(330026, false), AttrUtility.GetExpValueStr(down.needExp))); this.textHourExpValue.set_text(string.Format(GameDataUtils.GetChineseContent(330026, false), AttrUtility.GetExpValueStr(down.hourExp))); long value = down.hourExp + down.hourExp * 2L / 10L; this.textPowerExpValue.set_text(string.Format(GameDataUtils.GetChineseContent(330026, false), AttrUtility.GetExpValueStr(value))); }
public void RefreshUI() { OffLineLoginPush offHookData = OffHookManager.Instance.GetOffHookData(); this.SwitchMode(OffHookUI.Mode.BeginRegion); OffHookManager.Instance.SendPanelReq(); if (offHookData != null) { string time = TimeConverter.GetTime(offHookData.hasTime, TimeFormat.DHHMM_Chinese); this.textOffTime.set_text(string.Format(GameDataUtils.GetChineseContent(330024, false), time)); this.textLeftTimeValue.set_text(time); this.textLvValue.set_text(string.Format(GameDataUtils.GetChineseContent(330025, false), EntityWorld.Instance.EntSelf.Lv)); string time2 = TimeConverter.GetTime(offHookData.offTime, TimeFormat.DHHMM_Chinese); this.textOffTimeValue.set_text(time2); this.textGetExpValue.set_text(string.Format(GameDataUtils.GetChineseContent(330026, false), AttrUtility.GetExpValueStr(offHookData.addExp))); this.textLvUpValue1.set_text(string.Format(GameDataUtils.GetChineseContent(330025, false), offHookData.roleLv)); this.textLvUpValue2.set_text(string.Format(GameDataUtils.GetChineseContent(330025, false), EntityWorld.Instance.EntSelf.Lv)); } }
private void RefreshArea(GuaJiQuYuPeiZhi data) { if (data != null) { ResourceManager.SetSprite(this.mBackground, ResourceManager.GetIconSprite(this.BG_IMG[data.areaType])); this.mTxTitle.set_text(string.Format(GameDataUtils.GetChineseContent(511636, false), AttrUtility.GetExpValueStr(data.exp))); if (data.areaType == 3) { this.mTxTips.set_text(string.Format(GameDataUtils.GetChineseContent(HuntManager.Instance.GetIntOtherData("areaInfoTip" + data.areaType), false), data.condition)); } else { this.mTxTips.set_text(GameDataUtils.GetChineseContent(HuntManager.Instance.GetIntOtherData("areaInfoTip" + data.areaType), false)); } } }
public void UpdateExperienceCopyUI(ResultExperienceCopyNty result, int batch = -1) { string[] array = DataReader <FJingYanFuBenPeiZhi> .Get("ExpCost").value.Split(new char[] { ';' }); if (array.Length == 2) { ResourceManager.SetSprite(base.FindTransform("CoinIcon").GetComponent <Image>(), GameDataUtils.GetIcon(DataReader <Items> .Get(int.Parse(array[0])).littleIcon)); this.btnMultCoinText.set_text("x" + array[1]); this.BtnMultipleTextContent = DataReader <FJingYanFuBenPeiZhi> .Get("Exp").num + "倍经验"; } this.BtnTipTextContent = ((batch < 0) ? string.Empty : string.Format(GameDataUtils.GetChineseContent(513536, false), batch.ToString())); this.mGetExp = SpecialFightManager.Instance.GetBatchExp(batch) * (long)batch; this.expAndGoldList.get_Item(0).FindChild("Num").GetComponent <Text>().set_text(AttrUtility.GetExpValueStr(this.mGetExp)); this.expAndGoldList.get_Item(0).get_gameObject().SetActive(true); this.expAndGoldList.get_Item(1).get_gameObject().SetActive(false); this.mTxOldLevel.set_text("Lv." + ExperienceCopyInstance.Instance.BeforeLevel); this.mTxNewLevel.set_text("Lv." + this.GetNewLevel(ExperienceCopyInstance.Instance.BeforeExp + this.mGetExp, ExperienceCopyInstance.Instance.BeforeLevel)); this.mMultExpPanel.SetActive(true); Debug.Log(string.Concat(new object[] { "当前Exp:", ExperienceCopyInstance.Instance.BeforeExp, ", 获得Exp:", this.mGetExp, ", 当前等级: Lv.", ExperienceCopyInstance.Instance.BeforeLevel })); }
private void RefreshMultReward() { this.BtnMultipleVisibility = false; this.mGoMultExp.SetActive(true); this.mTxOldLevel.set_text("Lv." + ExperienceCopyInstance.Instance.BeforeLevel); this.mTxNewLevel.set_text("Lv." + EntityWorld.Instance.EntSelf.Lv); this.expAndGoldList.get_Item(0).FindChild("Num").GetComponent <Text>().set_text(AttrUtility.GetExpValueStr(this.mGetExp * 2L)); }