Merge branch 'main' of http://59.18.227.134:30008/dal4segno/Northbound
This commit is contained in:
@@ -87,6 +87,9 @@ namespace Northbound
|
|||||||
|
|
||||||
private void OnAttack(InputAction.CallbackContext context)
|
private void OnAttack(InputAction.CallbackContext context)
|
||||||
{
|
{
|
||||||
|
// UI가 열려있으면 액션 실행 안 함
|
||||||
|
if (UpgradeListPopup.IsOpen) return;
|
||||||
|
|
||||||
ExecuteAction("Attack");
|
ExecuteAction("Attack");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ namespace Northbound
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class UpgradeListPopup : MonoBehaviour
|
public class UpgradeListPopup : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
// 싱글톤 인스턴스 (UI 열림 상태 확인용)
|
||||||
|
private static UpgradeListPopup _instance;
|
||||||
|
public static bool IsOpen => _instance != null && _instance.gameObject.activeSelf;
|
||||||
|
|
||||||
[Header("References")]
|
[Header("References")]
|
||||||
[SerializeField] private Transform _contentParent;
|
[SerializeField] private Transform _contentParent;
|
||||||
[SerializeField] private GameObject _listItemPrefab;
|
[SerializeField] private GameObject _listItemPrefab;
|
||||||
@@ -24,6 +28,8 @@ namespace Northbound
|
|||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
_instance = this;
|
||||||
|
|
||||||
if (_closeButton != null)
|
if (_closeButton != null)
|
||||||
{
|
{
|
||||||
_closeButton.onClick.AddListener(Close);
|
_closeButton.onClick.AddListener(Close);
|
||||||
@@ -169,6 +175,10 @@ namespace Northbound
|
|||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
|
if (_instance == this)
|
||||||
|
{
|
||||||
|
_instance = null;
|
||||||
|
}
|
||||||
ClearList();
|
ClearList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user