From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/Tip/ScrollTip.cs |  199 ++++++++++++++++++++++++++-----------------------
 1 files changed, 107 insertions(+), 92 deletions(-)

diff --git a/Main/System/Tip/ScrollTip.cs b/Main/System/Tip/ScrollTip.cs
index b7cd12e..b58123b 100644
--- a/Main/System/Tip/ScrollTip.cs
+++ b/Main/System/Tip/ScrollTip.cs
@@ -2,114 +2,129 @@
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
-    public class ScrollTip
+public class ScrollTip
+{
+    public static List<SystemHintData> m_Hints = new List<SystemHintData>();
+    public static List<ScrollTipDetail> m_ActiveTips = new List<ScrollTipDetail>();
+
+    private static GameObjectPoolManager.GameObjectPool pool = null;
+
+    private static bool inited = false;
+
+    public static float tipMoveTime = 0.2f;
+
+    public static event Action OnTipReceiveEvent;
+
+    
+    public static void ShowTip(string tip, ArrayList infoList = null, int _order = 0)
     {
-        public static List<SystemHintData> m_Hints = new List<SystemHintData>();
-        public static List<ScrollTipDetail> m_ActiveTips = new List<ScrollTipDetail>();
-
-        private static GameObjectPoolManager.GameObjectPool pool = null;
-
-        private static bool inited = false;
-
-        public static float tipMoveTime = 0.2f;
-
-        public static event Action OnTipReceiveEvent;
-
-        
-        public static void ShowTip(string tip, ArrayList infoList = null, int _order = 0)
+        int range = Math.Min(m_Hints.Count, 10);
+        int findCnt = 0;
+        for (int i = 1; i <= range; i++)
         {
-            int range = Math.Min(m_Hints.Count, 10);
-            int findCnt = 0;
-            for (int i = 1; i <= range; i++)
+            if (m_Hints[m_Hints.Count - i].message == tip)
             {
-                if (m_Hints[m_Hints.Count - i].message == tip)
+                findCnt++;
+                if (findCnt == 3)
                 {
-                    findCnt++;
-                    if (findCnt == 3)
-                    {
-                        //鍒楄〃鍐呴噸澶嶆彁绀烘渶澶�3娆�
-                        return;
-                    }
+                    //鍒楄〃鍐呴噸澶嶆彁绀烘渶澶�3娆�
+                    return;
                 }
             }
-
-            m_Hints.Add(new SystemHintData()
-            {
-                message = tip,
-                extentionData = infoList == null ? infoList : new ArrayList(infoList),
-                appendTime = DateTime.Now,
-                order = _order
-            });
-
-            //m_Hints.Sort(SysNotifyMgr.Instance.Compare);
-
-            if (OnTipReceiveEvent != null)
-            {
-                OnTipReceiveEvent();
-            }
-
-            if (!UIManager.Instance.IsOpened<ScrollTipWin>())
-            {
-                UIManager.Instance.OpenWindow<ScrollTipWin>();
-            }
         }
 
-        public static ScrollTipDetail Request()
+        m_Hints.Add(new SystemHintData()
         {
-            ScrollTipDetail tip = null;
-            if (pool == null)
-            {
-                var _prefab = ResManager.Instance.LoadAsset<GameObject>("Prefab", "Tip");// UILoader.LoadPrefab("Tip");
-                pool = GameObjectPoolManager.Instance.RequestPool(_prefab);
-            }
-            if (pool != null)
-            {
-                tip = pool.Request().AddMissingComponent<ScrollTipDetail>();
-            }
-            return tip;
-        }
+            message = tip,
+            extentionData = infoList == null ? infoList : new ArrayList(infoList),
+            appendTime = DateTime.Now,
+            order = _order
+        });
 
-        public static void Release(ScrollTipDetail tip, bool next = true)
+        //m_Hints.Sort(SysNotifyMgr.Instance.Compare);
+
+        if (OnTipReceiveEvent != null)
         {
-            if (m_ActiveTips.Contains(tip))
-            {
-                tip.presentState = ScrollTipState.None;
-                m_ActiveTips.Remove(tip);
-            }
-            if (tip.gameObject != null && pool != null)
-            {
-                pool.Release(tip.gameObject);
-            }
-            if (m_ActiveTips.Count > 0 && next)
-            {
-                m_ActiveTips[0].Play(ScrollTipState.Hide);
-            }
+            OnTipReceiveEvent();
         }
-
-        public static void ReleaseAll()
-        {
-            for (int i = 0; i < m_ActiveTips.Count; i++)
-            {
-                Release(m_ActiveTips[i]);
-                i--;
-            }
-        }
-
-        public static void OnTipComplete()
-        {
-            if (OnTipReceiveEvent != null) OnTipReceiveEvent();
-        }
-
-        public static void Close()
+        //杩囨护涓嶆挱鏀剧殑鎯呭喌
+        if (!CanOpen())
         {
             m_Hints.Clear();
+            return;
         }
 
-        public enum ScrollTipState
+        if (!UIManager.Instance.IsOpened<ScrollTipWin>())
         {
-            None,
-            Idle,
-            Move,
-            Hide
+            UIManager.Instance.OpenWindow<ScrollTipWin>();
         }
     }
+
+    static bool CanOpen()
+    {
+
+        // if (HappyXBModel.Instance.isXBCoolTime)
+        //     return false;
+        return true;
+    }
+
+    public static ScrollTipDetail Request()
+    {
+        ScrollTipDetail tip = null;
+        if (pool == null)
+        {
+            var _prefab = UILoader.LoadPrefab("Tip");
+            pool = GameObjectPoolManager.Instance.RequestPool(_prefab);
+        }
+        if (pool != null)
+        {
+            tip = pool.Request().AddMissingComponent<ScrollTipDetail>();
+        }
+        return tip;
+    }
+
+    public static void Release(ScrollTipDetail tip, bool next = true)
+    {
+        if (m_ActiveTips.Contains(tip))
+        {
+            tip.presentState = ScrollTipState.None;
+            m_ActiveTips.Remove(tip);
+        }
+        if (tip.gameObject != null && pool != null)
+        {
+            pool.Release(tip.gameObject);
+        }
+        if (m_ActiveTips.Count > 0 && next)
+        {
+            m_ActiveTips[0].Play(ScrollTipState.Hide);
+        }
+    }
+
+    public static void ReleaseAll()
+    {
+        for (int i = 0; i < m_ActiveTips.Count; i++)
+        {
+            Release(m_ActiveTips[i]);
+            i--;
+        }
+    }
+
+    public static void OnTipComplete()
+    {
+        if (OnTipReceiveEvent != null) OnTipReceiveEvent();
+    }
+
+    public static void Close()
+    {
+        m_Hints.Clear();
+    }
+
+    //鏆傛椂淇濈暀 鏀圭敤dotween
+    public enum ScrollTipState
+    {
+        None,
+        Idle,
+        Move,
+        Hide
+    }
+}

--
Gitblit v1.8.0