public void OnClickRefresh(GameObject go) { if (BountyManager.Instance.Countdown < TimeManager.Instance.PreciseServerTime) { NetworkManager.Send(new BountyTaskRefreshReq { taskId = BountyManager.Instance.Info.taskId }, ServerType.Data); } else { UIManagerControl.Instance.OpenUI("DialogBoxUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush); string text = "A"; switch (this.quality + 1) { case 1: text = "D"; break; case 2: text = "C"; break; case 3: text = "B"; break; case 4: text = "A"; break; case 5: text = "S"; break; } XuanShangRenWuPeiZhi xuanShangRenWuPeiZhi = DataReader <XuanShangRenWuPeiZhi> .Get(BountyManager.Instance.Info.taskId); string content = string.Format(GameDataUtils.GetChineseContent(513627, false), xuanShangRenWuPeiZhi.upgradeCost, text); string chineseContent = GameDataUtils.GetChineseContent(513628, false); DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(chineseContent, content, delegate { }, delegate { }, delegate { NetworkManager.Send(new BountyTaskRefreshReq { taskId = BountyManager.Instance.Info.taskId }, ServerType.Data); }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null); } }
public void UpdateUI() { XuanShangRenWuPeiZhi xuanShangRenWuPeiZhi = DataReader <XuanShangRenWuPeiZhi> .Get(BountyManager.Instance.Info.taskId); ResourceManager.SetSprite(this.ImageQuality, ResourceManager.GetIconSprite("lcxs_quality_" + xuanShangRenWuPeiZhi.quality)); this.quality = xuanShangRenWuPeiZhi.quality; int star = DataReader <ShengLiBaoXiang> .Get(BountyManager.Instance.rewardBoxId).star; this.StarText.set_text(BountyManager.Instance.Info.hasStar + "/" + star); this.StarProgress.set_fillAmount(1f * (float)BountyManager.Instance.Info.hasStar / (float)star); this.RefreshStarBoxDetail(BountyManager.Instance.Info.hasStar); this.OnSecondPass(); }
public void UpdateUI() { XuanShangRenWuPeiZhi xuanShangRenWuPeiZhi = DataReader <XuanShangRenWuPeiZhi> .Get(BountyManager.Instance.Info.urgentTaskId); ResourceManager.SetSprite(this.ImageQuality, ResourceManager.GetIconSprite("lcxs_quality_" + xuanShangRenWuPeiZhi.quality)); this.quality = xuanShangRenWuPeiZhi.quality; int star = DataReader <JinJiShengLiBaoXiang> .Get(3).star; this.StarProgress.set_fillAmount(1f * (float)BountyManager.Instance.Info.hasStarUrgent / (float)star); using (List <int> .Enumerator enumerator = this.FxUidList.GetEnumerator()) { while (enumerator.MoveNext()) { int current = enumerator.get_Current(); FXSpineManager.Instance.DeleteSpine(current, true); } } this.FxUidList.Clear(); for (int i = 0; i < BountyManager.Instance.HasGotRewardUrgent.Length; i++) { ImageColorMgr.SetImageColor(this.ButtonBoxes[i].GetComponent <Image>(), false); JinJiShengLiBaoXiang jinJiShengLiBaoXiang = DataReader <JinJiShengLiBaoXiang> .Get(i + 1); if (BountyManager.Instance.Info.hasStarUrgent < jinJiShengLiBaoXiang.star) { ResourceManager.SetSprite(this.ButtonBoxes[i].GetComponent <Image>(), ResourceManager.GetIconSprite("dailytask_icon_bag7")); ImageColorMgr.SetImageColor(this.ButtonBoxes[i].GetComponent <Image>(), true); } else if (BountyManager.Instance.HasGotRewardUrgent[i]) { ResourceManager.SetSprite(this.ButtonBoxes[i].GetComponent <Image>(), ResourceManager.GetIconSprite("dailytask_icon_bag8")); } else { this.FxUidList.Add(FXSpineManager.Instance.ReplaySpine(0, 1705, this.FxTransform[i], "BountyUI", 2011, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None)); ResourceManager.SetSprite(this.ButtonBoxes[i].GetComponent <Image>(), ResourceManager.GetIconSprite("dailytask_icon_bag7")); } this.StarNums[i].set_text("x" + jinJiShengLiBaoXiang.star); this.StarNums[i].get_transform().Find("Text").GetComponent <Text>().set_text("x" + jinJiShengLiBaoXiang.star); this.StarNums[i].get_transform().Find("Text").get_gameObject().SetActive(BountyManager.Instance.Info.hasStarUrgent >= jinJiShengLiBaoXiang.star); this.StarNums[i].set_enabled(BountyManager.Instance.Info.hasStarUrgent < jinJiShengLiBaoXiang.star); } this.StarNums[3].set_text("x" + BountyManager.Instance.Info.hasStarUrgent); this.OnSecondPass(); }