Namespace: DeltaEngine.Input
Assembly: DeltaEngine.Input (in DeltaEngine.Input.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Input.Tests.GamePadButtonTriggerTests
2 unit tests call DeltaEngine.Input.GamePadButtonTrigger.State
Assembly: DeltaEngine.Input (in DeltaEngine.Input.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: StateRemarks
Examples
[Test, CloseAfterFirstFrame] public void Create() { var trigger = new GamePadButtonTrigger(GamePadButton.Y, State.Pressed); Assert.AreEqual(GamePadButton.Y, trigger.Button); Assert.AreEqual(State.Pressed, trigger.State); }
[Test, CloseAfterFirstFrame] public void CreateFromAttributes() { var trigger = new GamePadButtonTrigger(new Dictionary<string, string> { { "Button", "Y" }, { "State", " Pressed" } }); Assert.AreEqual(GamePadButton.Y, trigger.Button); Assert.AreEqual(State.Pressed, trigger.State); Assert.Throws<GamePadButtonTrigger.CannotCreateGamePadTriggerWithoutKey>( () => new GamePadButtonTrigger(new Dictionary<string, string>())); } }
See Also