void GetActiveInputDevice() { if (CurrentController == "Keyboard") { if (_Gamepad.IsConnected) { if (_Gamepad.GetAnyButton() || _Gamepad.GetStick_L().X != 0) { CurrentController = "Controller"; _MousePosition = Input.mousePosition; if (Navigator.SettingsMenu.WholeAreaObject.activeInHierarchy) { StartCoroutine(DelayedSelectButton(Navigator.SettingsMenu.StartButton)); } else if (ReferenceButton != null) { StartCoroutine(DelayedSelectButton(ReferenceButton)); } } } } else if (CurrentController == "Controller") { if (Input.GetMouseButton(0) || Input.GetKey(KeyCode.Escape) || Input.GetKey(KeyCode.Return) || _MousePosition != Input.mousePosition) { CurrentController = "Keyboard"; } } }
void GetActiveInputDevice() { if (CurrentController == "Keyboard") { if (_Gamepad.IsConnected) { if (_Gamepad.GetAnyButton() || _Gamepad.GetStick_L().X != 0) { CurrentController = "Controller"; } } } else if (CurrentController == "Controller") { if (Input.GetMouseButton(0) || Input.GetKey(KeyCode.Escape) || Input.GetKey(KeyCode.Return)) { CurrentController = "Keyboard"; } } }