Class GamePadDeviceExtensions
Provides easier ways to set vibration levels on a controller, rather than setting 4 motors
public static class GamePadDeviceExtensions- Inheritance
- 
      objectGamePadDeviceExtensions
Methods
IsButtonDown(IGamePadDevice, GamePadButton)
Determines whether the specified button is being pressed down
public static bool IsButtonDown(this IGamePadDevice gamepad, GamePadButton button)Parameters
- gamepadIGamePadDevice
- The gamepad 
- buttonGamePadButton
- The button 
Returns
- bool
- trueif the specified button is being pressed down; otherwise,- false.
IsButtonPressed(IGamePadDevice, GamePadButton)
Determines whether the specified button is pressed since the previous update.
public static bool IsButtonPressed(this IGamePadDevice gamepad, GamePadButton button)Parameters
- gamepadIGamePadDevice
- The gamepad 
- buttonGamePadButton
- The button 
Returns
- bool
- trueif the specified button is pressed; otherwise,- false.
IsButtonReleased(IGamePadDevice, GamePadButton)
Determines whether the specified button is released since the previous update.
public static bool IsButtonReleased(this IGamePadDevice gamepad, GamePadButton button)Parameters
- gamepadIGamePadDevice
- The gamepad 
- buttonGamePadButton
- The button 
Returns
- bool
- trueif the specified button is released; otherwise,- false.
SetVibration(IGamePadDevice, float)
Sets all the gamepad vibration motors to the same amount
public static void SetVibration(this IGamePadDevice gamepad, float amount)Parameters
- gamepadIGamePadDevice
- The gamepad 
- amountfloat
- The amount of vibration 
SetVibration(IGamePadDevice, float, float)
Sets the gamepad's large and small motors to the given amounts
public static void SetVibration(this IGamePadDevice gamepad, float largeMotors, float smallMotors)Parameters
- gamepadIGamePadDevice
- The gamepad 
- largeMotorsfloat
- The amount of vibration for the large motors 
- smallMotorsfloat
- The amount of vibration for the small motors