Ejemplo n.º 1
0
 /// <summary>
 /// Vibrates the gamepad at a given intensity and for a given duration.
 /// </summary>
 /// <param name="leftMotorIntensity">The speed of the left motor, between 0.0 and 1.0.</param>
 /// <param name="rightMotorIntensity">The speed of the right motor, between 0.0 and 1.0.</param>
 /// <param name="duration">The duration of the vibration in milliseconds.</param>
 public void SetVibration(float leftMotorIntensity, float rightMotorIntensity, float duration)
 {
     gamePad.Vibrate(leftMotorIntensity, rightMotorIntensity, duration);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Vibrates the gamepad at a given intensity and for a given duration.
        /// </summary>
        /// <param name="leftMotorIntensity">The speed of the left motor, between 0.0 and 1.0.</param>
        /// <param name="rightMotorIntensity">The speed of the right motor, between 0.0 and 1.0.</param>
        /// <param name="duration">The duration of the vibration in milliseconds.</param>
        public InputHandler SetVibration(float leftMotorIntensity, float rightMotorIntensity, float duration)
        {
            gamePad.Vibrate(leftMotorIntensity, rightMotorIntensity, duration);

            return(this);
        }