From 15b3357a13326ea382cf4860f92fd84bf4d68619 Mon Sep 17 00:00:00 2001
From: client_Lhy <995049470@qq.com>
Date: 星期二, 11 六月 2019 14:55:27 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/MainInterfacePanel/MainPositionTween.cs |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/System/MainInterfacePanel/MainPositionTween.cs b/System/MainInterfacePanel/MainPositionTween.cs
index 9ce40fa..cb48d4e 100644
--- a/System/MainInterfacePanel/MainPositionTween.cs
+++ b/System/MainInterfacePanel/MainPositionTween.cs
@@ -122,9 +122,18 @@
         public static bool isDefaultState { get; private set; }
         public static event Action<bool> switchFunctionStateEvent;
 
-        float resetToDefaultTimer = 0;
+        static float resetToDefaultTimer = 0;
+        public static void SetRecoverToSkillTimer()
+        {
+            resetToDefaultTimer = 20f;
+        }
+
         public void SwitchFunctions(SwitchParam switchParams)
         {
+            if (switchParams.manual && switchParams.showDefault)
+            {
+                resetToDefaultTimer = 0f;
+            }
             ProcessSwitch(switchParams);
         }
 
@@ -182,7 +191,11 @@
                     break;
             }
 
-            var rightBottomState = switchParams.showDefault && !isGuiding && !treasureModel.newGotShowing ? RightBottomState.Skill : RightBottomState.Function;
+            var rightBottomState = resetToDefaultTimer <= 0f
+                && switchParams.showDefault
+                && !isGuiding
+                && !treasureModel.newGotShowing ? RightBottomState.Skill : RightBottomState.Function;
+
             switch (rightBottomState)
             {
                 case RightBottomState.Function:
@@ -212,7 +225,7 @@
             }
 
             isDefaultState = rightBottomState == RightBottomState.Skill;
-            resetToDefaultTimer = !isDefaultState ? 7f : 0f;
+            resetToDefaultTimer = !isDefaultState ? 20f : 0f;
             m_RayMask.gameObject.SetActive(!isDefaultState);
 
             if (switchParams.immediately)
@@ -242,11 +255,7 @@
                 return;
             }
 
-            SwitchFunctions(new SwitchParam()
-            {
-                immediately = false,
-                showDefault = true,
-            });
+            resetToDefaultTimer = 0.0001f;
         }
 
         private void OnSwitchAccount()
@@ -277,6 +286,7 @@
         {
             public bool showDefault;
             public bool immediately;
+            public bool manual;
         }
 
     }

--
Gitblit v1.8.0