コード例 #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);
 }