Initial Unity project commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using UI.PanelStack;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI.PanelStack
|
||||
{
|
||||
public class UIActionMapRouter : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private bool debugLogs = true;
|
||||
|
||||
public void OnUICancel()
|
||||
{
|
||||
if (UIPanelStack.Instance == null) { return; }
|
||||
bool closed = UIPanelStack.Instance.CloseTop();
|
||||
if (debugLogs) Debug.Log($"[UIActionMapRouter] UI/Cancel triggered. closedTop={closed}");
|
||||
}
|
||||
|
||||
public void OnUIPause()
|
||||
{
|
||||
if (UIPanelStack.Instance == null) { return; }
|
||||
if (UIPanelStack.Instance.IsAnyOpen()) { return; }
|
||||
bool opened = UIPanelStack.Instance.TryOpenOnEscapeWhenEmpty();
|
||||
if (debugLogs) Debug.Log($"[UIActionMapRouter] UI/Pause triggered. openedMenu={opened}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user