From 3b2a6bb9047cfce9f501593b3669a9c1af6c5df4 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 05 十一月 2025 17:40:23 +0800
Subject: [PATCH] 130 战斗修改回合样式

---
 Main/Component/UI/Common/ClickScreenOtherSpace.cs |  113 +++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 66 insertions(+), 47 deletions(-)

diff --git a/Main/Component/UI/Common/ClickScreenOtherSpace.cs b/Main/Component/UI/Common/ClickScreenOtherSpace.cs
index a4c33bc..f2dd64b 100644
--- a/Main/Component/UI/Common/ClickScreenOtherSpace.cs
+++ b/Main/Component/UI/Common/ClickScreenOtherSpace.cs
@@ -5,59 +5,78 @@
 using System;
 using UnityEngine.Events;
 
-    [RequireComponent(typeof(RectTransform))]
-    public class ClickScreenOtherSpace : MonoBehaviour
+//鐐瑰嚮鍏朵粬鍖哄煙瑙﹀彂鎺у埗鏄鹃殣 鍙檮鍔犱簨浠�
+[RequireComponent(typeof(RectTransform))]
+public class ClickScreenOtherSpace : MonoBehaviour
+{
+    [SerializeField]
+    bool m_DeActiveSelf = true;
+    public bool deActiveSelf {
+        get { return m_DeActiveSelf; }
+        set { m_DeActiveSelf = value; }
+    }
+
+    [SerializeField]
+    RespondType m_RespondType = RespondType.Out;
+    public RespondType respondType {
+        get { return m_RespondType; }
+        set { m_RespondType = value; }
+    }
+
+    Action m_ClickOtherEvent;
+
+    public void AddListener(Action _callBack)
     {
-        [SerializeField]
-        bool m_DeActiveSelf = true;
-        public bool deActiveSelf {
-            get { return m_DeActiveSelf; }
-            set { m_DeActiveSelf = value; }
-        }
+        m_ClickOtherEvent = null;
+        m_ClickOtherEvent += _callBack;
+    }
 
-        [SerializeField]
-        RespondType m_RespondType = RespondType.Out;
-        public RespondType respondType {
-            get { return m_RespondType; }
-            set { m_RespondType = value; }
-        }
+    public void RemoveAllListeners()
+    {
+        m_ClickOtherEvent = null;
+    }
 
-        Action m_ClickOtherEvent;
 
-        public void AddListener(Action _callBack)
+    private void LateUpdate()
+    {
+        if (Input.GetMouseButtonDown(0))
         {
-            m_ClickOtherEvent += _callBack;
-        }
-
-        public void RemoveAllListeners()
-        {
-            m_ClickOtherEvent = null;
-        }
-
-        private void LateUpdate()
-        {
-            if (Input.GetMouseButtonDown(0)) {
-                var sp = Input.mousePosition;
-                switch (m_RespondType) {
-                    case RespondType.In:
-                        if (RectTransformUtility.RectangleContainsScreenPoint(this.transform as RectTransform, sp, CameraManager.uiCamera)) {
-                            m_ClickOtherEvent.Invoke();
-                            this.SetActive(!m_DeActiveSelf);
-                        }
-                        break;
-                    case RespondType.Out:
-                        if (!RectTransformUtility.RectangleContainsScreenPoint(this.transform as RectTransform, sp, CameraManager.uiCamera)) {
-                            m_ClickOtherEvent.Invoke();
-                            this.SetActive(!m_DeActiveSelf);
-                        }
-                        break;
-                }
+            var sp = Input.mousePosition;
+            switch (m_RespondType)
+            {
+                case RespondType.In:
+                    if (RectTransformUtility.RectangleContainsScreenPoint(this.transform as RectTransform, sp, CameraManager.uiCamera))
+                    {
+                        this.SetActive(!m_DeActiveSelf);
+                        m_ClickOtherEvent?.Invoke();
+                    }
+                    break;
+                case RespondType.Out:
+                    if (!RectTransformUtility.RectangleContainsScreenPoint(this.transform as RectTransform, sp, CameraManager.uiCamera))
+                    {
+                        this.SetActive(!m_DeActiveSelf);
+                        m_ClickOtherEvent?.Invoke();
+                    }
+                    break;
             }
         }
-
-        public enum RespondType
+        else if (Input.GetMouseButtonUp(0))
         {
-            In,
-            Out,
+            switch (m_RespondType)
+            {
+                case RespondType.InOut:
+                    this.SetActive(!m_DeActiveSelf);
+                    m_ClickOtherEvent?.Invoke();
+                    break;
+            }
         }
-    }
\ No newline at end of file
+    }
+
+    public enum RespondType
+    {
+        In,
+        Out,
+        InOut
+            
+    }
+}
\ No newline at end of file

--
Gitblit v1.8.0