Allows a touch dual drag to be detected.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Commands Trigger
DeltaEngine.Commands InputTrigger
DeltaEngine.Commands DragTrigger
DeltaEngine.Input TouchDualDragTrigger
Namespace: DeltaEngine.Input
Assembly: DeltaEngine.Input (in DeltaEngine.Input.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The TouchDualDragTrigger type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TouchDualDragTrigger(Dictionary String, String ) | Initializes a new instance of the TouchDualDragTrigger class | |
TouchDualDragTrigger(DragDirection) | Initializes a new instance of the TouchDualDragTrigger class |
Methods
Name | Description | |
---|---|---|
Add T | (Inherited from Entity.) | |
AddTag | (Inherited from Entity.) | |
ClearTags | (Inherited from Entity.) | |
Contains T | (Inherited from Entity.) | |
ContainsBehavior T | (Inherited from Entity.) | |
ContainsTag | (Inherited from Entity.) | |
Deactivate | (Inherited from Entity.) | |
Dispose | (Inherited from Entity.) | |
Get T |
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D)
View code on GitHub (Inherited from Entity.) | |
GetActiveBehaviors | (Inherited from Entity.) | |
GetComponentsForSaving | (Inherited from Entity.) | |
GetOrDefault T | (Inherited from Entity.) | |
GetTags | (Inherited from Entity.) | |
HandleWithTouch | ||
Invoke | (Inherited from Trigger.) | |
IsDragDirectionCorrect | (Inherited from DragTrigger.) | |
Remove T | (Inherited from Entity.) | |
RemoveTag | (Inherited from Entity.) | |
Set | (Inherited from Entity.) | |
SetComponents | (Inherited from Entity.) | |
Start T | (Inherited from Entity.) | |
StartInputDevice | (Overrides InputTrigger StartInputDevice .) | |
Stop T | (Inherited from Entity.) | |
ToString | (Inherited from Entity.) | |
Update | (Inherited from Trigger.) |
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) | |
Invoked | (Inherited from Trigger.) |
Properties
Name | Description | |
---|---|---|
Direction | (Inherited from DragTrigger.) | |
DoneDragging | (Inherited from DragTrigger.) | |
IsActive | (Inherited from Entity.) | |
IsPauseable | (Inherited from Trigger.) | |
Movement | (Inherited from DragTrigger.) | |
NumberOfComponents | (Inherited from Entity.) | |
SecondPosition | ||
SecondStartPosition | ||
StartPosition | (Inherited from DragTrigger.) | |
UpdatePriority | (Inherited from Entity.) | |
WasInvokedThisTick | (Inherited from Trigger.) |
Remarks
Examples
[Test] public void DragTouchToCreateRectangles() { MouseDragTriggerTests.DragToCreateRectangles(new TouchDualDragTrigger()); }
[Test, CloseAfterFirstFrame] public void DragTouch() { var touch = Resolve<Touch>() as MockTouch; if (touch == null) return; //ncrunch: no coverage bool isFinished = false; new Command((start, end, done) => isFinished = done).Add(new TouchDualDragTrigger()); SetTouchState(touch, State.Pressing, Vector2D.Zero); SetTouchState(touch, State.Pressed, Vector2D.One); SetTouchState(touch, State.Releasing, Vector2D.One); Assert.IsTrue(isFinished); }
[Test, CloseAfterFirstFrame] public void Create() { var trigger = new TouchDualDragTrigger(); Assert.AreEqual(DragDirection.Free, trigger.Direction); trigger = new TouchDualDragTrigger(new Dictionary<string, string> { { "Direction", "Horizontal" } });
See Also