// Set the vibration speed of a controller
 public static void SetVibration(int controllerNumber, ushort leftSpeed, ushort rightSpeed)
 {
     XInputVibration vibe = new XInputVibration(leftSpeed, rightSpeed);
     XInputMethods.ProcessResult(
         XInputMethods.XInputSetState(controllerNumber, ref vibe)
         );
 }
 extern static uint XInputSetState(
     int index,  // [in] Index of the gamer associated with the device
     ref XInputVibration vibration// [in, out] The vibration information to send to the controller
 );
示例#3
0
 extern static uint XInputSetState(
     int index,                    // [in] Index of the gamer associated with the device
     ref XInputVibration vibration // [in, out] The vibration information to send to the controller
     );