Ejemplo n.º 1
0
 private void EndTracking(TouchTracker a_Tracker, int remove_at)
 {
     if (EventTouchEnded != null)
     {
         EventTouchEnded(a_Tracker);
     }
     m_Trackers.RemoveAt(remove_at);
     m_TrackerLookup.Remove(a_Tracker.GetFingerID());
 }
Ejemplo n.º 2
0
        //-------

        private void OnTouchBegan(TouchTracker touch)
        {
            if (!_active)
            {
                return;
            }

            if (DidCollide(touch.GetCurrPosition()) && _active_touch < 0)
            {
                _active_touch = touch.GetFingerID();
                if (EventPress != null)
                {
                    EventPress(touch);
                }
            }
        }
Ejemplo n.º 3
0
 private void OnTouchUpdate(TouchTracker touch)
 {
     if (!_active)
     {
         return;
     }
     if (_active_touch >= 0 && _active_touch == touch.GetFingerID())
     {
         if (touch.DeltaPosition().magnitude > 0f)
         {
             if (EventDrag != null)
             {
                 EventDrag(touch);
             }
         }
     }
 }
Ejemplo n.º 4
0
 private void OnTouchEnded(TouchTracker touch)
 {
     if (!_active)
     {
         return;
     }
     if (_active_touch >= 0 && _active_touch == touch.GetFingerID())
     {
         if (DidCollide(touch.GetCurrPosition()))
         {
             if (EventRelease != null)
             {
                 EventRelease(touch);
             }
         }
         CancelTouch();
     }
 }