GamePadTests VibrateOnButtonPress Method Delta Engine Documentation

Namespace: DeltaEngine.Input.Tests
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void VibrateOnButtonPress()
Examples

[Test]
public void VibrateOnButtonPress()
{
    var gamePad = Resolve<GamePad>();
    new FontText(Font.Default, "Press X on GamePad to vibrate", Rectangle.One);
    new Command(() => gamePad.Vibrate(1f)).Add(new GamePadButtonTrigger(
        GamePadButton.X, State.Pressed));
    new Command(() => gamePad.Vibrate(0f)).Add(new GamePadButtonTrigger(
        GamePadButton.X, State.Released));
}
See Also