private InputController() { _controls = new InputAsset(); _inputContext = EInputContext.InGame; GameInputContext = new InGameInputContext(_controls.Game); UIInputContext = new UIInputContext(_controls.UI); EnablePlayerInput(); }
public InputController() { if (_instance != null) { return; } _controls = new InputAsset(); _instance = this; _inputContext = EInputContext.InGame; GameInputContext = new InGameInputContext(_controls.Game); UIInputContext = new UIInputContext(_controls.UI); EnablePlayerInput(); }
public void SetInputContext(EInputContext context) { _inputContext = context; switch (_inputContext) { case EInputContext.InGame: _controls.Game.Enable(); _controls.UI.Disable(); break; case EInputContext.UI: _controls.UI.Enable(); _controls.Game.Disable(); break; default: _controls.Game.Enable(); _controls.UI.Disable(); break; } }