public void InvokePointerDrag(Vector2 pointerPosition, Vector2 delta) { if (PointerDrag != null) { PointerDrag.Invoke(this, new PointerDraggedGraphicalElementEventArgs(pointerPosition, delta)); } }
public void OnDrag(PointerEventData eventData) { if (!pointerDown) { return; } if (eventData.pointerCurrentRaycast.gameObject == null || eventData.pointerCurrentRaycast.gameObject.tag != "Brick") { return; } int index = eventData.pointerCurrentRaycast.gameObject.transform.GetSiblingIndex(); PointerDrag?.Invoke(index); }