public void IsHovering() { var trigger = new TouchHoldTrigger(Rectangle.One, 0.5f); Assert.IsFalse(trigger.IsHovering()); trigger.Elapsed = 1f; Assert.IsFalse(trigger.IsHovering()); }
public void PessingInTheSamePositionWillMakeTriggerHover() { var trigger = new TouchHoldTrigger(Rectangle.One, 0.0001f); new Command(() => { }).Add(trigger); SetTouchState(State.Pressing, Vector2D.Half); SetTouchState(State.Pressed, Vector2D.Half); SetTouchState(State.Releasing, Vector2D.Half); Assert.IsTrue(trigger.IsHovering()); }