From 551ce834874e0864349a9968b6be71c27a8e2810 Mon Sep 17 00:00:00 2001 From: YangHua <1475658476@qq.com> Date: Wed, 4 Sep 2024 15:24:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A9=BF=E9=80=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/CXX/Devices/杂/门/Door.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/Scripts/CXX/Devices/杂/门/Door.cs b/Assets/Scripts/CXX/Devices/杂/门/Door.cs index 7c9602e..90fd93d 100644 --- a/Assets/Scripts/CXX/Devices/杂/门/Door.cs +++ b/Assets/Scripts/CXX/Devices/杂/门/Door.cs @@ -3,6 +3,7 @@ using HighlightPlus; using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.EventSystems; /// /// ͨ @@ -31,16 +32,19 @@ public class Door : MonoBehaviour private void OnMouseDown() { + if (EventSystem.current.IsPointerOverGameObject()) return; isOpen = !isOpen; transform.DOLocalRotate(dic[isOpen], duration); } private void OnMouseEnter() { + if (EventSystem.current.IsPointerOverGameObject()) return; highlightEffect.SetHighlighted(true); } private void OnMouseExit() { + if (EventSystem.current.IsPointerOverGameObject()) return; highlightEffect.SetHighlighted(false); }