示例#1
0
        public static void SetVibration(PlayerIndex playerIndex, float leftMotor, float rightMotor)
        {
            XInputVibrationState vib = new XInputVibrationState();

            vib.LeftMotorSpeed  = (ushort)(leftMotor * 65535);
            vib.RightMotorSpeed = (ushort)(rightMotor * 65535);
            Imports.XInputSetState((uint)playerIndex, ref vib);
        }
示例#2
0
 public static extern uint XInputSetState(uint playerIndex, ref XInputVibrationState vib);