public void OnPointerClick(PointerEventData eventData) { if (onClick != null) { onClick.Invoke(eventData); } }
public void OnPointerClick() { RaycastHit hit; if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit)) { pointClick = new Vector3(hit.point.x, transform.position.y, hit.point.z); OnPointerClickEvent?.Invoke(pointClick); isFindTarget = true; } }
void IPointerClickHandler.OnPointerClick(PointerEventData eventData) { OnPointerClickEvent?.Invoke(eventData); }
/// <summary> /// Clicked on an ItemSlot. /// </summary> /// <param name="eventData"></param> public void OnPointerClick(BaseEventData eventData) { // Invoking this event for all listeners only if they exist. // The ? checks if the event is null or not. OnPointerClickEvent?.Invoke(this); }
public virtual void OnPointerClick(PointerEventData eventData) { OnPointerClickEvent?.Invoke(eventData); }
// Image _image; // Color _defaultColor; // Color _glowColor = new Color32(255,255,255,1); // void Awake() // { // _image = gameObject.GetComponentInParent<Image>(); // _defaultColor = _image.color; // } public void OnPointerClick(PointerEventData eventData) => OnPointerClickEvent?.Invoke();
public void OnPointerClick(PointerEventData eventData) { onPointerClickEvent.Invoke(eventData); }