CCT.NUI.HandTracking.Mouse.TwoFingerClickMode.Process C# (CSharp) Method

Process() public method

public Process ( HandCollection handData ) : void
handData HandCollection
return void
        public override void Process(HandCollection handData)
        {
            var fingerCount = handData.Hands[0].FingerCount;
            if (twoFingersDetected == null && fingerCount == 2)
            {
                twoFingersDetected = DateTime.Now;
            }
            if (fingerCount == 1)
            {
                twoFingersDetected = null;
            }

            if (twoFingersDetected.HasValue && DateTime.Now > twoFingersDetected.Value.AddMilliseconds(100))
            {
                if (fingerCount == 2 && !this.mouseDown)
                {
                    UserInput.MouseDown();
                    this.mouseDown = true;
                }
            }
            if (fingerCount == 1 && this.mouseDown)
            {
                UserInput.MouseUp();
                this.mouseDown = false;
            }
        }
TwoFingerClickMode