예제 #1
0
        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);
                }
            }
        }
예제 #2
0
 public void onDragDeckItem(BuildDeckListItem item, PointerEventData pointer)
 {
     onDragItem(item.card, pointer.position);
 }