업그레이드를 위한 클릭 시, 공격이 나가지 않도록 함

This commit is contained in:
2026-02-23 17:04:20 +09:00
parent e841438997
commit 9e2a950281
2 changed files with 13 additions and 0 deletions

View File

@@ -87,6 +87,9 @@ namespace Northbound
private void OnAttack(InputAction.CallbackContext context)
{
// UI가 열려있으면 액션 실행 안 함
if (UpgradeListPopup.IsOpen) return;
ExecuteAction("Attack");
}

View File

@@ -12,6 +12,10 @@ namespace Northbound
/// </summary>
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();
}
}