Пример #1
0
        public void OnPointerEnter(PointerEventData eventData)
        {
            OnHover.Invoke(eventData, this);

            /*if (Input.touches.Length > 0) {
             *  HoverStartTime = Time.unscaledTime;
             *  TouchHover = true;
             * }*/
        }
Пример #2
0
 public void OnPointerClick(PointerEventData eventData)
 {
     //if (InvalidateClick) return;
     //if (TouchHover && Time.unscaledTime - HoverStartTime > MinHoverTime) return;
     if (eventData.button == PointerEventData.InputButton.Left)
     {
         OnLeftClick.Invoke(eventData, this);
     }
     if (eventData.button == PointerEventData.InputButton.Middle)
     {
         OnMiddleClick.Invoke(eventData, this);
     }
     if (eventData.button == PointerEventData.InputButton.Right)
     {
         OnRightClick.Invoke(eventData, this);
     }
 }
Пример #3
0
 public void OnPointerExit(PointerEventData eventData)
 {
     OnEndHover.Invoke(eventData, this);
     //InvalidateClick = false;
     //TouchHover = false;
 }
Пример #4
0
 public void OnPointerUp(PointerEventData eventData)
 {
     OnUp.Invoke(eventData, this);
 }
Пример #5
0
 public void OnPointerDown(PointerEventData eventData)
 {
     OnDown.Invoke(eventData, this);
 }