refactor(UI):完善对于各个界面的管理逻辑,esc可以直接关闭所有的顶层UI

This commit is contained in:
2025-10-27 21:41:25 +08:00
parent 1462f4689e
commit 4951f25187
21 changed files with 18049 additions and 6374 deletions

View File

@@ -9,6 +9,7 @@ namespace Script.Gameplay.Input
public class InputManager : MonoSingleton<InputManager>, IInputManager
{
public PlayerInputActions Input; // 自动生成的输入类
private UIManager _uiManager;
// 当前输入值
public Vector2 Move { get; private set; }
@@ -58,7 +59,8 @@ namespace Script.Gameplay.Input
Input.Player.Edit.performed += ctx => EditPressed = true;
Input.Player.Edit.canceled += ctx => EditPressed = false;
UIManager.Instance.RegisterInputManager(this);
_uiManager = UIManager.Instance;
_uiManager.RegisterInputManager(this);
}
private void Update()