private void RefreshMatrial() { var info = ConfigManager.Get <NpcPerfusionInfo>(_npc.starLv); int cost = 0, own = 0; if (info?.costs.Length > 0) { cost = info.costs[0].count; own = moduleEquip.GetPropCount(info.costs[0].itemId) - info.costs[0].count * _excuteTimes; var prop = ConfigManager.Get <PropItemInfo>(info.costs[0].itemId); AtlasHelper.SetIcons(costIcon, prop?.icon); AtlasHelper.SetIcons(_costIcon2, prop?.icon); Util.SetText(costTitle, Util.Format(ConfigText.GetDefalutString(TextForMatType.NpcAwakeUI, 4), prop?.itemName)); if (prop != null) { ushort itemId = (ushort)prop.ID; _costIcon2?.GetComponentDefault <Button>().onClick.AddListener(() => { moduleGlobal.UpdateGlobalTip(itemId, true); }); } } Util.SetText(costLabel, cost.ToString()); Util.SetText(ownLabel, Util.Format(ConfigText.GetDefalutString(TextForMatType.NpcAwakeUI, 5), own)); if (costLabel) { costLabel.color = ColorGroup.GetColor(ColorManagerType.IsMatrialEnough, cost <= own); } }
private void Refresh() { if (null == _chaseTask) { return; } int index = 0; index = _chaseTask.taskData.resetTimes >= _chaseTask.taskConfigInfo.dayRemainCount - 1 ? _chaseTask.taskConfigInfo.dayRemainCount - 1 : _chaseTask.taskData.resetTimes; if (index < 0 || index > _chaseTask.taskConfigInfo.cost.Length - 1) { return; } string[] str = _chaseTask.taskConfigInfo.cost[index].Split('-'); if (str.Length < 2) { return; } var prop = ConfigManager.Get <PropItemInfo>(Util.Parse <int>(str[0])); contentTip.text = Util.Format(ConfigText.GetDefalutString(TextForMatType.ChaseUIText, 30), str[1], prop.itemName); int remainCount = _chaseTask.taskConfigInfo.dayRemainCount - _chaseTask.taskData.resetTimes; currentDayCount.text = Util.Format(ConfigText.GetDefalutString(TextForMatType.ChaseUIText, 31), remainCount >= 0 ? remainCount : 0); AtlasHelper.SetItemIcon(costIcon, prop); bool canPay = modulePlayer.roleInfo.diamond >= Util.Parse <int>(str[1]); string colorStr = GeneralConfigInfo.GetNoEnoughColorString(modulePlayer.roleInfo.diamond.ToString()); Util.SetText(costCount, (int)TextForMatType.ChaseUIText, 32, str[1], canPay ? modulePlayer.roleInfo.diamond.ToString() : colorStr); sureBtn.interactable = canPay && remainCount > 0; }
private void AddClickState(int state, long unionId) { m_addBtn.interactable = false; m_addBtnTxt.gameObject.SetActive(true); m_applyBtnTxt.gameObject.SetActive(false); m_fullApproveText.gameObject.SetActive(true); m_levelInsufficient.gameObject.SetActive(false); if (state == 2) { Util.SetText(m_fullApproveText, ConfigText.GetDefalutString(242, 157)); } else { var have = Module_Union.instance.ApplyUnionList.Exists(a => a == unionId); if (have || state == 1) { m_applyBtnTxt.gameObject.SetActive(true); m_addBtnTxt.gameObject.SetActive(false); } else { m_addBtn.interactable = true; } } }
private void SetTipPlane(int effId) { BossEffectInfo eff = ConfigManager.Get <BossEffectInfo>(effId); if (eff == null) { return; } Util.SetText(effectDesc, eff.descId); Util.SetText(effectName, eff.nameId); effectSure.onClick.RemoveAllListeners(); effectSure.onClick.AddListener(delegate { moduleUnion.SendBuyEffect(effId); }); if (moduleUnion.BossInfo != null) { effectSure.SafeSetActive(moduleUnion.BossInfo.bossstate == 1); effectCancle.SafeSetActive(moduleUnion.BossInfo.bossstate == 1); } if (eff.cost == null || eff.cost?.Length <= 0) { effectCost.gameObject.SetActive(false); } else { effectCost.gameObject.SetActive(true); Util.SetText(effectCost, ConfigText.GetDefalutString(242, 211), eff.cost[0].count, modulePlayer.roleInfo.diamond); } }
private void OnResetPanel() { var info = moduleGlobal.system.resetPrice; bool isContains = false; for (int i = 0; i < info.Length; i++) { if (info[i].times == modulePlayer.roleInfo.resetTimes + 1) { isContains = true; break; } } diamondPay = isContains ? info[modulePlayer.roleInfo.resetTimes + 1].price : info[0].price; if (modulePlayer.roleInfo.diamond >= diamondPay) { Util.SetText(remainText, Util.Format(Util.GetString((int)TextForMatType.TravalShopUIText, 11), diamondPay, modulePlayer.roleInfo.diamond)); } else { Util.SetText(remainText, GeneralConfigInfo.GetNoEnoughColorString(ConfigText.GetDefalutString(configID, 34)), diamondPay, modulePlayer.roleInfo.diamond); } int point = 0; if (!string.IsNullOrEmpty(m_Lv.text)) { point = Util.Parse <int>(m_Lv.text) * 3 - 3; } if (totalPoint == point) { moduleGlobal.ShowMessage(ConfigText.GetDefalutString(TextForMatType.AttributeUIText, 21)); return; } m_ResetPanel.SafeSetActive(true); }
private void OnBuyItem(ScChargeBuyItem msg) { if (msg.result != 0) { moduleGlobal.ShowMessage(ConfigText.GetDefalutString(9302, msg.result)); } }
private void ShowBoxReward(BossBoxReward wrad) { if (wrad == null) { Logger.LogError("confige is error"); return; } m_previewPlane.gameObject.SetActive(true); Util.SetText(m_canGetTxt, ConfigText.GetDefalutString(wrad.descID)); AwardGetSucced reward = m_rewardGroup.GetComponentDefault <AwardGetSucced>(); if (wrad != null) { reward.SetUnionAward(m_rewardShowList, wrad.preview); } float nowblood = (float)(moduleUnion.m_bossStage.bossHP * wrad.condition) / 100f; m_getRewardBtn.gameObject.SetActive(false); if (moduleUnion.BossInfo.remianblood <= nowblood) { m_getRewardBtn.gameObject.SetActive(true); } m_getRewardBtn.onClick.RemoveAllListeners(); m_getRewardBtn.onClick.AddListener(delegate { //发送领取奖励 moduleUnion.GetBoxReward(wrad.ID); }); }
private void ResponseChargeGetSign(ScChargeDailyRebateGet msg) { if (msg.result != 0) { moduleGlobal.ShowMessage(9855, msg.result); return; } if (m_currentControl != null && m_currentControl.Info.id == msg.whichday) { m_currentControl.Info.draw = true; m_currentControl.InitData(m_chargeItem, m_currentControl.Info, msg.whichday); Window_ItemTip.Show(ConfigText.GetDefalutString(TextForMatType.RechargeUIText, 30), m_currentControl.Info.reward); } else { var dailyInfo = m_rewards.oneinfo.Find(item => item.id == msg.whichday); if (null != dailyInfo) { dailyInfo.draw = true; RefreshList(); Window_ItemTip.Show(ConfigText.GetDefalutString(TextForMatType.RechargeUIText, 30), dailyInfo.reward); } } }
private void RefreshPrev() { var petInfo = petSelectModule.selectInfo; if (petInfo == null) { return; } var grade = petInfo.GetUpGradeInfo(petInfo.Grade - 1); var skill = petInfo.GetSkill(grade); if (skill != null) { Util.SetText(leftName, Util.Format(ConfigText.GetDefalutString(skill.skillName), petInfo.AdditiveLevel - 1)); AtlasHelper.SetShared(leftIcon, skill.skillIcon); } if (AttrGroupRoot == null) { return; } //创建属性条 var rList = petInfo.GetAttribute(petInfo.Level, petInfo.Grade - 1); foreach (var aShow in rList) { var t = AttrGroupRoot.AddNewChild(AttrTemplete); t.SafeSetActive(true); BindProperty(t, aShow); cache.Add((CreatureFields)aShow.id, t); } }
public override void OnRenderUpdate() { base.OnRenderUpdate(); var factionActive = moduleGuide.IsActiveFunction(HomeIcons.Faction); m_stateTintRoot.SafeSetActive(factionActive && moduleFactionBattle.IsActive); switch (moduleFactionBattle.state) { case Module_FactionBattle.State.Sign: Util.SetText(m_factionActiveTime, Util.Format(ConfigText.GetDefalutString(558, 6), moduleFactionBattle.SignCountDown)); break; case Module_FactionBattle.State.Readly: Util.SetText(m_factionActiveTime, Util.Format(ConfigText.GetDefalutString(558, 7), moduleFactionBattle.ReadlyCountDown)); break; case Module_FactionBattle.State.Processing: Util.SetText(m_factionActiveTime, Util.Format(ConfigText.GetDefalutString(558, 8), moduleFactionBattle.CountDown)); break; } m_rankActiveRoot.SafeSetActive(moduleGlobal.IsStayLoLTime()); if (moduleGlobal.IsStayLoLTime()) { Util.SetText(m_rankCountDown, Util.Format(ConfigText.GetDefalutString(558, 8), moduleHome.RankCountDown)); } }
void _Packet(ScSkillBuyPoint p) { if (p.result != 0) { if (p.result == 1) { moduleGlobal.ShowMessage(ConfigText.GetDefalutString(TextForMatType.SkillUIText, 20)); } else if (p.result == 2) { moduleGlobal.ShowMessage(ConfigText.GetDefalutString(TextForMatType.SkillUIText, 21)); } return; } AudioManager.PlaySound(AudioInLogicInfo.audioConst.clickToSucc); moduleGlobal.ShowMessage(ConfigText.GetDefalutString(TextForMatType.SkillUIText, 19)); if (skillInfo == null) { return; } skillInfo.buyTimes = p.times; ChangeSkillPoint(p.curSkillPoint); SetPointState(); DispatchModuleEvent(EventBuySkillPointSuccess); }
private void SetTimeTxt(int recordTime, Text timeTxt) { DateTime old = Util.GetDateTime(recordTime); DateTime now = Util.GetServerLocalTime(); TimeSpan span = now - old; if (span.Days < 0) { Logger.LogError("Window_Unionreward record info time {0}", old); return; } if (span.Days > 30) { Util.SetText(timeTxt, ConfigText.GetDefalutString(631, 40)); } else if (span.Days > 0) { Util.SetText(timeTxt, ConfigText.GetDefalutString(631, 15), span.Days); } else if (span.Days == 0 && span.Hours > 0) { Util.SetText(timeTxt, ConfigText.GetDefalutString(631, 41), span.Hours); } else if (span.Days == 0 && span.Hours == 0) { Util.SetText(timeTxt, ConfigText.GetDefalutString(631, 42), span.Minutes); } }
void _ME(ModuleEvent <Module_Shop> e) { if (moduleShop.curShopPos != ShopPos.NpcDating) { return; } switch (e.moduleEvent) { case Module_Shop.EventShopData: var list = e.param1 as List <ShopMessage>; if (list == null || list.Count < 1) { break; } moduleShop.SetCurrentShop(list[0]); break; case Module_Shop.EventTargetShopData: m_shopMessage = (ShopMessage)e.param1; List <PShopItem> tempList = new List <PShopItem>(m_shopMessage.items); moduleNPCDating.HotelShopItemList = tempList; _Index(1); //默认刷新第一页 break; case Module_Shop.EventPaySuccess: Window_ItemTip.Show(ConfigText.GetDefalutString(TextForMatType.TravalShopUIText, 13), moduleShop.curClickItem); Hide <Window_DatingRestaurant>(); //关闭菜单界面 break; default: break; } }
private void OnExcute() { var info = ConfigManager.Get <NpcPerfusionInfo>(_npc.starLv); if (null == info) { return; } if (!moduleEquip.EnoughPropFromCheckItemPair(info.costs, _excuteTimes + 1)) { if (_excuteTimes > 0) { moduleAwake.Request_NpcPerfusion(_npcId, _excuteTimes); } moduleGlobal.ShowMessage(ConfigText.GetDefalutString(9815, 1)); return; } _excuteTimes++; _npc.starExp += info.onceExp; if (_npc.starExp >= info.exp || _excuteTimes >= 1) { moduleAwake.Request_NpcPerfusion(_npcId, _excuteTimes); } else { moduleNpc.DispatchEvent(Module_Npc.NpcPerfusionChangeEvent); RefreshUI(); } }
public void Enter() { if (bordlandTime == null) { return; } if (Level.current && Level.current is Level_Bordlands) { moduleGlobal.ShowMessage(ConfigText.GetDefalutString(TextForMatType.BorderlandUIText, 33)); return; } moduleGuide.needEnterBordland = false; if (!isValidBordland && bordlandsSettlementReward == null) { string content = ConfigText.GetDefalutString(TextForMatType.BorderlandUIText, 17); Window_Alert.ShowAlert(content); return; } if (isLeaveBordland) { SendEnterBordLand(); } else { Game.LoadLevel(BORDERLAND_LEVEL_ID); } }
public void RefreshDisselectableExpItem(EvolveMaterial item, uint totalCount) { InitComponent(); m_propInfo = ConfigManager.Get <PropItemInfo>(item.propId); if (m_propInfo == null) { return; } Util.SetItemInfo(m_itemObj, m_propInfo, 0, 0, false); bool enough = totalCount >= item.num; string totalStr = enough ? totalCount.ToString() : GeneralConfigInfo.GetNoEnoughColorString(totalCount.ToString()); Util.SetText(m_countText, ConfigText.GetDefalutString(TextForMatType.EquipIntentyUI, 16), totalStr, item.num); if (m_icon) { EventTriggerListener.Get(m_icon.gameObject).onClick = (obj) => { if (m_propInfo) { Module_Global.instance.SetTargetMatrial(m_propInfo.ID, (int)item.num); } } } ; } }
void _ME(ModuleEvent <Module_Shop> e) { if (!actived || moduleShop.curShopPos != ShopPos.Npc) { return; } switch (e.moduleEvent) { case Module_Shop.EventShopData: var list = e.param1 as List <ShopMessage>; if (list == null || list.Count < 1) { break; } moduleShop.SetCurrentShop(list[0]); break; case Module_Shop.EventTargetShopData: RefreshNpcShop(); break; case Module_Shop.EventPaySuccess: unlockTip.SafeSetActive(false); Window_ItemTip.Show(ConfigText.GetDefalutString(TextForMatType.TravalShopUIText, 13), moduleShop.curClickItem); suiteData.UpdateItems(); unlockBtn.interactable = true; unlockBtn.SafeSetActive(false); break; case Module_Shop.EventPromoChanged: var msg = e.param1 as ShopMessage; if (msg != null && msg.pos == ShopPos.Maze) { DefaultState(); int page = suiteView.currentPage; suiteData.UpdateItems(); suiteView.ScrollToPage(page); } break; case Module_Shop.EventNpcChangeEquip: var result = (sbyte)e.param1; if (result != 0) { equipBtn.interactable = true; } else { if (moduleNPCDating.curDatingNpcMsg != null) { ChangeNpcMode(moduleNPCDating.curDatingNpcMsg.mode); } suiteData.UpdateItems(); } break; default: break; } }
public override void OnRenderUpdate() { base.OnRenderUpdate(); if (moduleFactionBattle.IsProcessing) { Util.SetText(m_countDownText, moduleFactionBattle.CountDown); } var cooling = moduleFactionBattle.IsMatchCooling; var matching = moduleFactionBattle.Matching; m_reliveRoot.SafeSetActive(cooling || matching); if (cooling) { Util.SetText(m_commonHintText, ConfigText.GetDefalutString(TextForMatType.FactionBattleUI, 9)); Util.SetText(m_reliveCountDown, moduleFactionBattle.MatchCoolTime); } else if (matching) { Util.SetText(m_commonHintText, ConfigText.GetDefalutString(TextForMatType.FactionBattleUI, 12)); Util.SetText(m_reliveCountDown, Util.GetTimeFromSec(Mathf.RoundToInt(Time.realtimeSinceStartup - m_matchTime), ":")); } m_matchButton.SetInteractable(moduleFactionBattle.state == Module_FactionBattle.State.Processing && !moduleFactionBattle.IsMatchCooling && moduleFactionBattle.IsSignIn); }
protected override void RefreshData(params object[] p) { base.RefreshData(p); var lonly = p.Length > 0 && (bool)p[0]; var children = Root.transform.GetChildList(); foreach (var t in children) { t.gameObject.SetActive(!lonly); } m_defeat.SafeSetActive(!moduleFactionBattle.IsWin && moduleFactionBattle.SelfFaction != Module_FactionBattle.Faction.None); m_victory.SafeSetActive(moduleFactionBattle.IsWin && moduleFactionBattle.SelfFaction != Module_FactionBattle.Faction.None); if (lonly) { return; } Util.SetText(m_settlement.factionName, moduleFactionBattle.SelfFactionName); Util.SetText(m_settlement.rank, Util.Format(ConfigText.GetDefalutString(TextForMatType.FactionBattleUI, 5), moduleFactionBattle.SelfRank)); Util.SetText(m_settlement.score, moduleFactionBattle.SelfScore.ToString()); Util.SetText(m_settlement.comboKill, Module_FactionBattle.GetKillString(moduleFactionBattle.ComboKill)); Util.SetText(m_settlement.maxComboKill, Module_FactionBattle.GetKillString(moduleFactionBattle.MaxComboKill)); m_settlement.maxComboKill?.transform.parent.SafeSetActive(!string.IsNullOrEmpty(m_settlement.maxComboKill.text)); m_settlement.SetMaxComboKillBg(moduleFactionBattle.MaxComboKill); }
private void SetSelfState(int title) { if (Module_Union.instance.inUnion == 0)//我的职位(0 会长1 副会长2普通) { m_removeBtn.gameObject.SetActive(true); m_presidentBtn.gameObject.SetActive(true); m_vicePresidentBtn.gameObject.SetActive(true); Util.SetText(m_beNormal, 242, 37); if (title == 1) { m_beNormal.text = ConfigText.GetDefalutString(242, 168); } } else if (Module_Union.instance.inUnion == 1) { if (title == 0 || title == 1) { m_removeBtn.gameObject.SetActive(false); m_presidentBtn.gameObject.SetActive(false); m_vicePresidentBtn.gameObject.SetActive(false); } else { m_removeBtn.gameObject.SetActive(true); } } else { m_removeBtn.gameObject.SetActive(false); m_presidentBtn.gameObject.SetActive(false); m_vicePresidentBtn.gameObject.SetActive(false); } }
//succed tip private void ShowSuccedReward(PItem2[] info, int boxId) { m_previewPlane.gameObject.SetActive(false); Window_ItemTip.Show(ConfigText.GetDefalutString(242, 194), info); AnmiaDelayTimes = 0; SetBoxState(boxId, m_rewardObj[boxId]); }
public AudioConversion() { InitializeComponent(); var upax = ConfigText.GetBindingExpression(TextBox.TextProperty); var _inputBinding = new Binding("Value") { Mode = BindingMode.OneWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged, Path = new PropertyPath("AudioFiles"), Source = this, Converter = new AudioFilesToCfgMusicConverter(), ConverterParameter = ConversionParameters }; //_inputBinding.Converter = new AudioFilesToCfgMusicConverter {param = ConversionParameters}; ConfigText.SetBinding(TextBox.TextProperty, _inputBinding); ConversionParameters.PropertyChanged += (sender, args) => { var upx = ConfigText.GetBindingExpression(TextBox.TextProperty); upx.UpdateTarget(); }; encoder.OnProgress += (sender, conversion, args) => { var file = AudioFiles.FirstOrDefault((x => x.FileName == conversion.FileName)); if (file == null) { return; } file.ConversionProgress = args.Percent; }; }
void _ME(ModuleEvent <Module_Union> e) { switch (e.moduleEvent) { case Module_Union.EventUnionCardSign: if (!actived) { return; } moduleUnion.RemoveFirstSign(); SetSignInfo(); break; case Module_Union.EventUnionCardChange: SetTimesTxt(); break; case Module_Union.EventUnionCardReward: var point = Util.Parse <int>(e.param1.ToString()); DelayEvents.Add(() => { moduleGlobal.ShowMessage(string.Format(ConfigText.GetDefalutString(629, 15), point)); }, 0.5f); SetTimesTxt(); break; } }
public static string CombineGradeName(this PetUpGradeInfo.UpGradeInfo rInfo, int star) { string[] starNum = { "Ⅰ", "Ⅱ", "Ⅲ", "Ⅳ", "Ⅴ", "Ⅵ", "Ⅶ", "Ⅷ", "Ⅸ" }; var index = Mathf.Clamp(star - 1, 0, starNum.Length - 1); return(ConfigText.GetDefalutString(60000, rInfo.grade - 1) + starNum[index]); }
public void Refresh() { Util.SetText(nameText, Data.info.name); Util.SetText(desc, Data.info.desc); Util.SetText(costNumber, Data.info.cost.ToString()); Util.SetText(symbol, Util.GetChargeCurrencySymbol((ChargeCurrencyTypes)Data.info.currencyType)); Util.SetText(remainTime, Util.Format(ConfigText.GetDefalutString(TextForMatType.RechargeUIText, 2), Util.GetTimeStampDiff((int)Data.info.endTime, true))); Util.SetText(limitLevel, Util.Format(ConfigText.GetDefalutString(TextForMatType.RechargeUIText, 3), Data.info.minLevelLimit, Data.info.maxLevelLimit)); remainTime.SafeSetActive(Data.info.endTime > 0); limitLevel.SafeSetActive(Data.info.maxLevelLimit > 0); if (!string.IsNullOrEmpty(Data.info.icon)) { AtlasHelper.SetChargeLarge(icon, Data.info.icon); } else { icon.SafeSetActive(false); Logger.LogError($"{Data.info.name} 无效的道具图标 {Data.info.icon}"); } RefreshCount(); }
private void ShowSuiteWords(ushort suite, Text twoText, Text fourText, bool isTwo = false, bool isFour = false, bool isInBigShowPanel = false) { RuneBuffInfo runeBuff = ConfigManager.Get<RuneBuffInfo>(suite); if (runeBuff == null) return; string attrName = ConfigText.GetDefalutString(TextForMatType.AttributeUIText, (int)runeBuff.attrId); if (isTwo) twoText.color = m_ColorGreen; else twoText.color = m_ColorNormal; if (runeBuff.addType == 1) { if (runeBuff.attrId == 9 || runeBuff.attrId == 10 || runeBuff.attrId == 11 || runeBuff.attrId == 12 || runeBuff.attrId == 13) Util.SetText(twoText, (int)TextForMatType.RuneUIText, isInBigShowPanel ? 39 : 0, attrName, runeBuff.value.ToString("P2")); else Util.SetText(twoText, (int)TextForMatType.RuneUIText, isInBigShowPanel ? 39 : 0, attrName, runeBuff.value); } else if (runeBuff.addType == 2) Util.SetText(twoText, (int)TextForMatType.RuneUIText, isInBigShowPanel ? 39 : 0, attrName, runeBuff.value.ToString("P2")); if (isFour) fourText.color = m_ColorGreen; else fourText.color = m_ColorNormal; var buff = ConfigManager.Get<BuffInfo>(runeBuff.buffId); if (buff != null) { if (!isInBigShowPanel) Util.SetText(fourText, (int)TextForMatType.RuneUIText, 1, buff.desc); else Util.SetText(fourText, buff.desc); } }
public void Init(AssistWindow_MoppingUp.Entry data) { InitComponent(); if (dataSource == null) { dataSource = new DataSource <PItem2>(data.reward.rewardList, scrollView, OnSetData, OnItemClick); } else { dataSource.SetItems(data.reward.rewardList); } Util.SetText(exp, data.reward.expr.ToString()); Util.SetText(coin, data.reward.coin.ToString()); Util.SetText(times, Util.Format(ConfigText.GetDefalutString(TextForMatType.MoppingUpUI, 9), data.times)); if (Module_Global.instance.targetMatrial.isProcess && data.getCount > 0) { targetRoot.SafeSetActive(true); Util.SetItemInfo(targetIcon, ConfigManager.Get <PropItemInfo>(Module_Global.instance.targetMatrial.itemId), 0, data.getCount, false); Util.SetText(targetProcess, $"{data.nowMatrialCount}/{data.targetMatrialCount}"); if (targetProcess) { targetProcess.color = ColorGroup.GetColor(ColorManagerType.IsMatrialEnough, data.nowMatrialCount >= data.targetMatrialCount); } targetIcon?.GetComponentDefault <Button>()? .onClick.AddListener( () => Module_Global.instance.UpdateGlobalTip((ushort)Module_Global.instance.targetMatrial.itemId, false, false)); } else { targetRoot.SafeSetActive(false); } }
private void Get() { ActiveText = ConfigManager.Get <ConfigText>((int)TextForMatType.ActiveUIText); if (ActiveText == null) { ActiveText = ConfigText.emptey; Logger.LogError("this id can not"); } taskname = transform.Find("name_text").GetComponent <Text>(); taskdetail = transform.Find("describe_text").GetComponent <Text>(); rewardContent = transform.Find("rewardgrid").gameObject; get_btn = transform.Find("get_btn").GetComponent <Button>(); go_btn = transform.Find("go_btn").GetComponent <Button>(); remaintime = transform.Find("remain_text/time_text").GetComponent <Text>(); progress = transform.Find("progress_bg").GetComponent <Image>(); progress_value = transform.Find("progress_bg/progress").GetComponent <Image>(); my_value = transform.Find("progress_bg/current_text").GetComponent <Text>(); should_value = transform.Find("progress_bg/max_text").GetComponent <Text>(); Util.SetText(transform.Find("get_btn/get_text").GetComponent <Text>(), ActiveText[6]); Util.SetText(transform.Find("go_btn/get_text").GetComponent <Text>(), ActiveText[18]); Util.SetText(transform.Find("remain_text").GetComponent <Text>(), ActiveText[7]); child.Clear(); foreach (Transform item in rewardContent.transform) { child.Add(item.gameObject); } }
private void RefreshCurrent(PChargeItem data) { currentItem = data; Util.SetText(confirmText, Util.Format(ConfigText.GetDefalutString(TextForMatType.RechargeUIText, 5), Util.GetChargeCurrencySymbol(data.info.currencyType) + data.info.cost, data.info.name)); }
public void RefreshTaskItem(TaskInfo info) { taskInfo = info; BaseRestrain.SetRestrainData(gameObject, taskInfo ? taskInfo.ID : 0); InitComponent(); SetName(info); SetState(TaskState.NoTouch); RefreshFlag(); itemButton.onClick.RemoveAllListeners(); itemButton.onClick.AddListener(() => { string str = string.Empty; for (var i = 0; i < taskInfo.dependId.Length; i++) { var task = ConfigManager.Get <TaskInfo>(taskInfo.dependId[i]); if (null == task) { continue; } if (!string.IsNullOrEmpty(str)) { str += ","; } str += task.name; } Module_Global.instance.ShowMessage(Util.Format(ConfigText.GetDefalutString(TextForMatType.AwakeStage, 45), str)); }); }