public void OnPointerClick(PointerEventData eventData)
 {
     if (eventData.clickCount == 2)
     {
         onDoubleClick.Invoke();
     }
 }
Пример #2
0
 void DoubleClick()
 {
     if (onDoubleClick != null)
     {
         onDoubleClick.Invoke();
     }
     ResetClickTime();
 }
Пример #3
0
    public void OnPointerDown(PointerEventData eventData)
    {
        //      doubleClickEvent.is
        touchDownEvent.Invoke();

        if (cameraCenter != null)
        {
            if (Input.touches.Length == 2)
            {
                zConutOffset  = 0;
                disVec2       = new Vector2(Input.touches[0].position.x - Input.touches[1].position.x, Input.touches[0].position.y - Input.touches[1].position.y).magnitude;
                disVec2_first = disVec2;
                zCountStart   = cameraCenter.currentCamera.Zcount;

                inZoom  = true;
                inTouch = false;
            }
            else if (Input.touches.Length == 1)
            {
                xConutOffset  = 0;
                yConutOffset  = 0;
                firstPosition = Input.touches[0].position;

                inZoom  = false;
                inTouch = true;
            }

            flip = !flip;

            if (flip)
            {
                aClickPosition = eventData.position;
                mTimeA         = Time.time;
            }
            else
            {
                bClickPosition = eventData.position;
                mTimeB         = Time.time;
            }

            if (Mathf.Abs(mTimeA - mTimeB) < 0.3f && Vector2.Distance(aClickPosition, bClickPosition) < 30)
            {
                doubleClickEvent.Invoke(eventData);
                cameraCenter.currentCamera.DoubleClick(eventData.position);
            }

#if UNITY_EDITOR || UNITY_STANDALONE_WIN
            xConutOffset = 0;
            yConutOffset = 0;

            firstPosition = eventData.position;
#endif

            cameraCenter.currentCamera.TouchDown(firstPosition);
        }
    }
Пример #4
0
 private void mouseClicked()
 {
     if (lastClickTime <= 0)
     {
         lastClickTime = MaxTimeBetween;
     }
     else
     {
         lastClickTime = 0;
         OnDoubleClick.Invoke();
     }
 }
Пример #5
0
        public void DoubleClickOpen()
        {
            IsSelected = !IsSelected;

            if (IsFolder)
            {
                FileClickedEvent?.Invoke(this, fileClickedArg);
            }
            else
            {
                DoubleClickEvent?.Invoke(this, fileClickedArg);
            }
        }
Пример #6
0
 public static void InvokeDoubleClickEvent(MouseClickEventArgs args)
 {
     DoubleClickEvent?.Invoke(args);
 }
Пример #7
0
 public void DoubleClick(object sender, MouseButtonEventArgs args)
 {
     DoubleClickEvent?.Invoke(sender, args);
 }