refactor(UI):完善对于各个界面的管理逻辑,esc可以直接关闭所有的顶层UI
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user