示例#1
0
        protected override void ProcessUpEventPointer(int id, Vector2 pos)
        {
            if (!FingerIdsToLastPos.ContainsKey(id))
            {
                return;
            }

            UpdateGestureStartEndStatus(false, id, pos);
        }
示例#2
0
        protected override void ProcessMoveEventPointers(Dictionary <int, Vector2> fingerIdsToMovePos)
        {
            if (!HasGestureStarted) // nothing to do is the gesture has not started yet
            {
                return;
            }

            foreach (var id in fingerIdsToMovePos.Keys)
            {
                if (!FingerIdsToLastPos.ContainsKey(id))
                {
                    continue;
                }

                if ((fingerIdsToMovePos[id] - FingerIdsToLastPos[id]).Length() > ConfigTap.MaximumDistanceTaps)
                {
                    EndCurrentTap();
                    return;
                }
            }
        }
示例#3
0
        protected override void ProcessUpEventPointer(int id, Vector2 pos)
        {
            if (!FingerIdsToLastPos.ContainsKey(id))
            {
                return;
            }

            FingerIdsToLastPos.Remove(id);

            if (NbOfFingerOnScreen == 0)
            {
                elapsedSinceTakeOff = TimeSpan.Zero;
                isTapDown           = false;

                if (HasGestureStarted && maxNbOfFingerTouched == ConfigTap.RequiredNumberOfFingers)
                {
                    ++currentNumberOfTaps;
                }

                maxNbOfFingerTouched = 0;
            }
        }