From 3fee933b56d18bb325257a1f957c01d1454409cb Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 16 一月 2019 23:27:48 +0800
Subject: [PATCH] 3335 代码优化
---
System/MainInterfacePanel/MainInterfaceWin.cs | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/System/MainInterfacePanel/MainInterfaceWin.cs b/System/MainInterfacePanel/MainInterfaceWin.cs
index 2394347..ae0494a 100644
--- a/System/MainInterfacePanel/MainInterfaceWin.cs
+++ b/System/MainInterfacePanel/MainInterfaceWin.cs
@@ -148,6 +148,7 @@
IceCrystalVeinModel m_IceCrystalVeinModel;
IceCrystalVeinModel iceCrystalVeinModel { get { return m_IceCrystalVeinModel ?? (m_IceCrystalVeinModel = ModelCenter.Instance.GetModel<IceCrystalVeinModel>()); } }
#region Built-in
+ private bool IsUpdateBool=true;
protected override void BindController()
{
m_MapSwitchingBehaviour.InitAwake();
@@ -195,6 +196,7 @@
{
IsOpenMaininterface();
}
+ IsUpdateBool = true;
SliderOpen = true;
horseRidBool = false;
friendsModel.askAddFriendEvent = FriendQuestBtn;
@@ -247,6 +249,7 @@
purchaseModel.UpdateNewMysticalEvent += UpdateMysticalPurchaseImag;
fairyGrabBossModel.gotoBossStateUpdate += ShowFairyGrabBoss;
ChatTip.OnChatUpEvent += RefreshAdaptiveChat;
+ GlobalTimeEvent.Instance.secondEvent += secondEvent;
IsCrossServerOneVsOne();
SetAtkType();
}
@@ -426,6 +429,7 @@
NewBieCenter.Instance.guideBeginEvent -= GuideBeginEvent;
fairyGrabBossModel.gotoBossStateUpdate -= ShowFairyGrabBoss;
ChatTip.OnChatUpEvent -= RefreshAdaptiveChat;
+ GlobalTimeEvent.Instance.secondEvent -= secondEvent;
if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
{
WindowCenter.Instance.CloseImmediately<FunctionForecastWin>();
@@ -435,6 +439,15 @@
fairyGrabBossModel.bossGrabHintEvent -= bossGrabHintEvent;
wishModel.UpdateWishAwardEvent -= UpdateWishAwardImag;
m_CollectBehaviour.gameObject.SetActive(false);
+ }
+
+ private void secondEvent()
+ {
+ if (IsUpdateBool)
+ {
+ StartCoroutine(featureNoticeModel.WhetherToPlayTheBox());//鍔熻兘棰勫憡
+ IsUpdateBool = false;
+ }
}
private void GuideBeginEvent()
@@ -1034,7 +1047,7 @@
ArticleExperience();//鍏充簬缁忛獙鏉�
if (_tCDBPlayerRefresh == PlayerDataRefresh.LV)
{
- StartCoroutine(featureNoticeModel.WhetherToPlayTheBox());//鍔熻兘棰勫憡
+ IsUpdateBool = true;
}
if (_tCDBPlayerRefresh == PlayerDataRefresh.ExAttr5)//鍒ゆ柇鏄惁鍐嶈法鏈�
{
--
Gitblit v1.8.0