feat(): 大量更新

This commit is contained in:
2025-10-15 21:31:13 +08:00
parent 546f08c53a
commit 668bfe12eb
178 changed files with 11318 additions and 446 deletions

View File

@@ -25,6 +25,13 @@ namespace Core
private Dictionary<UILayer, Transform> layerRoots = new Dictionary<UILayer, Transform>();
private Dictionary<string, UIBase> openedUIs = new Dictionary<string, UIBase>();
private IInputManager inputManager;
public void RegisterInputManager(IInputManager inputMgr)
{
inputManager = inputMgr;
}
public void RegisterLayer(UILayer layer, Transform root)
{
@@ -122,18 +129,19 @@ namespace Core
private void UpdateCursorState()
{
if(inputManager == null) return;
bool shouldLockCursor = !IsHasNonBackgroundUIActive; //&& !isInMainMenu; // 仅在没有非Background UI且不在主菜单时锁定鼠标
if (shouldLockCursor)
{
InputManager.Instance.SetCursorState(false, CursorLockMode.Locked);
inputManager.SetCursorState(false, CursorLockMode.Locked);
}
else
{
InputManager.Instance.SetCursorState(true, CursorLockMode.None);
inputManager.SetCursorState(true, CursorLockMode.None);
}
InputManager.Instance.SetInputForLook(shouldLockCursor);
InputManager.Instance.SetInputForMove(shouldLockCursor);
inputManager.SetInputForLook(shouldLockCursor);
inputManager.SetInputForMove(shouldLockCursor);
}
}
}