public virtual void OnXboxInputUpdate(XboxControllerEventData eventData) { if (string.IsNullOrEmpty(GamePadName)) { GamePadName = eventData.GamePadName; } if (XboxControllerMapping.GetButton_Down(SelectButton, eventData)) { CurrentGestureState = GestureState.SelectButtonPressed; InputManager.Instance.RaiseSourceDown(eventData.InputSource, eventData.SourceId, InteractionSourcePressInfo.Select); HoldStartedRoutine = StartCoroutine(HandleHoldStarted(eventData)); } if (XboxControllerMapping.GetButton_Pressed(SelectButton, eventData)) { HandleNavigation(eventData); } if (XboxControllerMapping.GetButton_Up(SelectButton, eventData)) { HandleSelectButtonReleased(eventData); } // Consume this event eventData.Use(); }
protected static bool OnButton_Pressed(XboxControllerMappingTypes buttonType, XboxControllerEventData eventData) { return(XboxControllerMapping.GetButton_Pressed(buttonType, eventData)); }