common extensions and some utilities
This commit is contained in:
@@ -44,14 +44,11 @@ namespace RebootKit.Engine.Services.Console {
|
||||
|
||||
public ConsoleService(Config config) {
|
||||
_config = config;
|
||||
}
|
||||
|
||||
public async UniTask OnWakeUp(CancellationToken cancellationToken) {
|
||||
|
||||
_logger.Info("Waking up");
|
||||
|
||||
_ui = UnityEngine.Object.Instantiate(_config.ConsoleUIPrefab);
|
||||
UnityEngine.Object.DontDestroyOnLoad(_ui.gameObject);
|
||||
await UniTask.Yield(cancellationToken);
|
||||
|
||||
_config.ToggleAction.Action.Enable();
|
||||
_config.ToggleAction.Action.performed += OnToggleAction;
|
||||
@@ -156,9 +153,11 @@ namespace RebootKit.Engine.Services.Console {
|
||||
_ui.SetVisibility(!_ui.IsVisible);
|
||||
|
||||
if (_ui.IsVisible) {
|
||||
// RR.Input().DisableControls();
|
||||
RR.Input().DisableControls();
|
||||
RR.Input().UnlockCursor();
|
||||
} else {
|
||||
RR.Input().EnableControls();
|
||||
RR.Input().LockCursor();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user