public void onReleaseDeckItem(BuildDeckListItem item, PointerEventData pointer) { DragCard.hide(); Vector3 localPosition = DeckViewScroll.GetComponent <RectTransform>().InverseTransformPoint(pointer.position); if (DeckViewScroll.GetComponent <RectTransform>().rect.Contains(localPosition)) { onReleaseItem(); } else { if (item.count < 1) { BuildDeckList.removeItem(item); } } }
public void onDragDeckItem(BuildDeckListItem item, PointerEventData pointer) { onDragItem(item.card, pointer.position); }