feat(): 完成将Manager从Gameplay转移到Core,实现循环次数持久化,实现设置面板
This commit is contained in:
@@ -57,10 +57,6 @@ namespace Script.Gameplay.Input
|
||||
Input.Player.Edit.performed += ctx => EditPressed = true;
|
||||
Input.Player.Edit.canceled += ctx => EditPressed = false;
|
||||
|
||||
SetCursorState(false, CursorLockMode.Locked);
|
||||
SetInputForLook(true);
|
||||
SetInputForMove(true);
|
||||
|
||||
UIManager.Instance.RegisterInputManager(this);
|
||||
}
|
||||
|
||||
@@ -118,13 +114,13 @@ namespace Script.Gameplay.Input
|
||||
{
|
||||
_hasFocus = hasFocus;
|
||||
// 失去焦点视为系统级暂停
|
||||
if (_hasFocus)
|
||||
if (_hasFocus && ScenesManager.Instance.IsInGameplay)
|
||||
{
|
||||
SetCursorState(_hasFocus, CursorLockMode.Locked);
|
||||
SetCursorState(false, CursorLockMode.Locked);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursorState(_hasFocus, CursorLockMode.None);
|
||||
SetCursorState(true, CursorLockMode.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user