Exemple #1
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);
                }
            }
        }
Exemple #2
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();
     }
 }