Example #1
0
 private void OnScrollHandler(UUIEventListener listener)
 {
     if (onFingerScroll != null)
     {
         float scale = 1 + listener.pointerEventData.scrollDelta.y * 0.1f;
         onFingerScroll.Invoke(scale);
     }
 }
Example #2
0
        private void OnUpHandler(UUIEventListener listener)
        {
            int touchID = listener.pointerEventData.pointerId;

            m_panelTouchPosDict.Remove(touchID);
            if (m_panelTouchPosDict.Count > 0)
            {
                return;
            }

            float dragDist = Vector2.Distance(listener.pointerEventData.pressPosition, listener.pointerEventData.position);

            if (onAllFingersUp != null)
            {
                onAllFingersUp.Invoke(dragDist);
            }
        }