GamePad Vibrate Method Delta Engine Documentation

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

public abstract void Vibrate(
	float strength
)
Remarks

Tests: DeltaEngine.Input.Tests.GamePadTests
Examples

1 unit tests call DeltaEngine.Input.GamePad.Vibrate(System.Single)
[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