From 9e2a950281d740520d89a5cbc91f534017202955 Mon Sep 17 00:00:00 2001 From: dal4segno Date: Mon, 23 Feb 2026 17:04:20 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=85=EA=B7=B8=EB=A0=88=EC=9D=B4=EB=93=9C?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=9C=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C?= =?UTF-8?q?,=20=EA=B3=B5=EA=B2=A9=EC=9D=B4=20=EB=82=98=EA=B0=80=EC=A7=80?= =?UTF-8?q?=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/PlayerActionSystem.cs | 3 +++ Assets/Scripts/UI/UpgradeListPopup.cs | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/Assets/Scripts/PlayerActionSystem.cs b/Assets/Scripts/PlayerActionSystem.cs index 77a8064..28ca514 100644 --- a/Assets/Scripts/PlayerActionSystem.cs +++ b/Assets/Scripts/PlayerActionSystem.cs @@ -87,6 +87,9 @@ namespace Northbound private void OnAttack(InputAction.CallbackContext context) { + // UI가 열려있으면 액션 실행 안 함 + if (UpgradeListPopup.IsOpen) return; + ExecuteAction("Attack"); } diff --git a/Assets/Scripts/UI/UpgradeListPopup.cs b/Assets/Scripts/UI/UpgradeListPopup.cs index 6527d3b..13701e0 100644 --- a/Assets/Scripts/UI/UpgradeListPopup.cs +++ b/Assets/Scripts/UI/UpgradeListPopup.cs @@ -12,6 +12,10 @@ namespace Northbound /// public class UpgradeListPopup : MonoBehaviour { + // 싱글톤 인스턴스 (UI 열림 상태 확인용) + private static UpgradeListPopup _instance; + public static bool IsOpen => _instance != null && _instance.gameObject.activeSelf; + [Header("References")] [SerializeField] private Transform _contentParent; [SerializeField] private GameObject _listItemPrefab; @@ -24,6 +28,8 @@ namespace Northbound private void Awake() { + _instance = this; + if (_closeButton != null) { _closeButton.onClick.AddListener(Close); @@ -169,6 +175,10 @@ namespace Northbound private void OnDestroy() { + if (_instance == this) + { + _instance = null; + } ClearList(); } }