public void OnPointerEnter(PointerEventData eventData) { OnHover.Invoke(eventData, this); /*if (Input.touches.Length > 0) { * HoverStartTime = Time.unscaledTime; * TouchHover = true; * }*/ }
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); } }
public void OnPointerExit(PointerEventData eventData) { OnEndHover.Invoke(eventData, this); //InvalidateClick = false; //TouchHover = false; }
public void OnPointerUp(PointerEventData eventData) { OnUp.Invoke(eventData, this); }
public void OnPointerDown(PointerEventData eventData) { OnDown.Invoke(eventData, this); }