From 6fdd4b40277b3aab892a8a0cadc310a492f20d2b Mon Sep 17 00:00:00 2001
From: lwb <q3213421wrwqr>
Date: 星期三, 24 二月 2021 16:34:59 +0800
Subject: [PATCH] Merge branch 'master' into ILRuntime

---
 System/WindowBase/OneLevelWin.cs |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/System/WindowBase/OneLevelWin.cs b/System/WindowBase/OneLevelWin.cs
index 33dc7ff..4fd3704 100644
--- a/System/WindowBase/OneLevelWin.cs
+++ b/System/WindowBase/OneLevelWin.cs
@@ -73,6 +73,9 @@
 
             m_TitleIcon.SetSprite(WindowConfig.GetTitleIconKey(name));
             m_TitleIcon.SetNativeSize();
+
+            PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerDataUpdate;
+
         }
 
         protected override void AddListeners()
@@ -89,7 +92,7 @@
                 m_Diamond = this.GetComponent<Text>("Pivot/Container_BackGround/FollowStoreBottom/GoldCountBG/CountText");
                 m_BindDiamond = this.GetComponent<Text>("Pivot/Container_BackGround/FollowStoreBottom/GoldPaperCountBG/CountText");
 
-            PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerDataUpdate;
+            
             UpdateMoney();
         }
 
@@ -99,7 +102,6 @@
 
         protected override void OnPreClose()
         {
-            PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerDataUpdate;
             CloseSubWindows();
         }
 
@@ -138,6 +140,17 @@
             m_Group.SetFunctionButtonActive(order, isShow);
         }
 
+        public RedPointState GetFunctionButtonRedPointState(int order)
+        {
+            return m_Group.GetFunctionButtonRedPointState(order);
+        }
+
+        public void FunctionButtonInvoke(int order)
+        {
+            m_Group.TriggerByOrder(order);
+            m_Group.GotoOrder(order);
+        }
+
         private void OnPlayerDataUpdate(PlayerDataType type)
         {
             switch (type)

--
Gitblit v1.8.0