public void AddGamepadTrigger(GamepadTrigger gt) { if (_currentPanel != null) { _currentPanel.AddGamepadTrigger(gt); } }
protected override void OnDisable() { base.OnDisable(); for (int i = 0; i < nbJoystick; i++) { joystickSlots[i].SetActive(false); } _gamepadTrigger = null; }
public override float GetTrigger(GamepadTrigger trigger) { switch (trigger) { case GamepadTrigger.Left: return(state.Triggers.Left); case GamepadTrigger.Right: return(state.Triggers.Right); } return(0); }
public float GetTrigger(GamepadTrigger triggerType) { switch (triggerType) { case GamepadTrigger.Left: return(GetInputValue(UnGamepadConfig.InputTarget.LeftTrigger)); case GamepadTrigger.Right: return(GetInputValue(UnGamepadConfig.InputTarget.RightTrigger)); } throw new UnityException(); }
public SmartController() { Controller = new Controller(UserIndex.One); LeftThumb = new GamepadThumb(); RightThumb = new GamepadThumb(); LeftTrigger = new GamepadTrigger(); RightTrigger = new GamepadTrigger(); var vls = (GamepadButtons[])Enum.GetValues(typeof(GamepadButtons)); Buttons = vls.Select(x => new GamepadButton(toSharpDx[(int)x], x)).ToArray(); active = true; updateRate = (int)(1000f / 60f); thread = new Thread(BackgroundThread); thread.IsBackground = true; thread.Start(); }
public void AddGamepadTrigger(GamepadTrigger et) { if (_gamepadTrigger == null) { _gamepadTrigger = et; foreach (EventTrigger.Entry entry in _gamepadTrigger.Triggers ?? Enumerable.Empty <EventTrigger.Entry>()) { if (!_onSubmitIsActive) { if (entry.eventID != EventTriggerType.Submit) { _eventTrigger.triggers.Add(entry); } } else { _eventTrigger.triggers.Add(entry); } } } }
public float GetTrigger (GamepadTrigger triggerType) { switch (triggerType) { case GamepadTrigger.Left: return GetInputValue (UnGamepadConfig.InputTarget.LeftTrigger); case GamepadTrigger.Right: return GetInputValue (UnGamepadConfig.InputTarget.RightTrigger); } throw new UnityException (); }
public abstract float GetTrigger(GamepadTrigger trigger);
public override float GetTrigger (GamepadTrigger trigger) { return currentState.GetTrigger (trigger); }
public override float GetTrigger(GamepadTrigger trigger) { return(currentState.GetTrigger(trigger)); }
public override float GetTrigger (GamepadTrigger trigger) { switch(trigger) { case GamepadTrigger.Left: return state.Triggers.Left; case GamepadTrigger.Right: return state.Triggers.Right; } return 0; }