Rumble+and+Floats+Example

protected            override             void       Update(       GameTime        gameTime) {     // Allows the game to exit if      (       GamePad       .GetState(       PlayerIndex       .One).Buttons.Back ==       ButtonState        .Pressed) this .Exit; // TODO: Add your update logic here float rumbleChangeAmount = 0.01f; if       (rumbleAmount == 1) { increaseRumble = false ; decreaseRumble = true ; }      else             if        (rumbleAmount == 0) { increaseRumble = true ; decreaseRumble = false ; }      if       (increaseRumble ==       true        ) { rumbleAmount = rumbleAmount + rumbleChangeAmount; if       (rumbleAmount > 1) { rumbleAmount = 1; } }     if       (decreaseRumble ==       true        ) { rumbleAmount = rumbleAmount - rumbleChangeAmount; if       (rumbleAmount < 0) { rumbleAmount = 0; } }     GamePad       .SetVibration(       PlayerIndex        .One, rumbleAmount, rumbleAmount); base .Update(gameTime); }