StateExtensions ClassDelta Engine Documentation
Extensions to make it easier to work with Input states used for keys, buttons and gestures. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Input StateExtensions

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

public static class StateExtensions

The StateExtensions type exposes the following members.

Methods

  NameDescription
Public methodStatic memberUpdateOnNativePressing
Top
Remarks

Tests: DeltaEngine.Input.Tests.StateExtensionsTests
Examples

1 unit tests call DeltaEngine.Input.StateExtensions
[Test]
public void TestUpdateStates()
{
    var state = State.Released;
    state = state.UpdateOnNativePressing(true);
    Assert.AreEqual(State.Pressing, state);
    state = state.UpdateOnNativePressing(true);
    Assert.AreEqual(State.Pressed, state);
    state = state.UpdateOnNativePressing(false);
    Assert.AreEqual(State.Releasing, state);
    state = state.UpdateOnNativePressing(false);
    Assert.AreEqual(State.Released, state);
}
See Also