private void Update() { if (AllowCharacterControll) { horizontal = gamepadInput.GetJoystickAxis(GamepadJoystick.LeftJoystickHorizontal); if (gamepadInput.IsDown(GamepadButton.ButtonX)) { jump = true; } //if (gamepadInput.IsDown(GamepadButton.ButtonB)) //{ // crouch = true; //} //else if (gamepadInput.IsUp(GamepadButton.ButtonB)) //{ // crouch = false; //} direction.Set(gamepadInput.GetJoystickAxis(GamepadJoystick.RightJoystickHorizontal), gamepadInput.GetJoystickAxis(GamepadJoystick.RightJoystickVertical), 0); if (gamepadInput.IsDown(GamepadButton.RBumper)) { if (IsThrowPowerFromButtonHold) { StartGatheringPower(); } else { power = throwForce; throwObject = true; } } if (gamepadInput.IsPressed(GamepadButton.RBumper)) { if (IsThrowPowerFromButtonHold) { ContinueGatheringPower(); } } if (gamepadInput.IsUp(GamepadButton.RBumper)) { throwObject = true; } } }