Exemple #1
0
        public void onReleaseCardItem(BuildCardListItem item, PointerEventData pointer)
        {
            DragCard.hide();
            Vector3 localPosition = DeckViewScroll.GetComponent <RectTransform>().InverseTransformPoint(pointer.position);

            if (DeckViewScroll.GetComponent <RectTransform>().rect.Contains(localPosition))
            {
                onReleaseItem();
            }
        }
Exemple #2
0
        public int sortCompareMethod(BuildCardListItem a, BuildCardListItem b)
        {
            switch (sortMethod)
            {
            default:
            case SortMethod.ID:
                return(a.card.id - b.card.id);

            case SortMethod.ID_R:
                return(b.card.id - a.card.id);

            case SortMethod.Cost:
                return(a.card.getCost() - b.card.getCost());

            case SortMethod.Attack:
                return(a.card.getAttack() - b.card.getAttack());

            case SortMethod.Cost_R:
                return(b.card.getCost() - a.card.getCost());

            case SortMethod.Attack_R:
                return(b.card.getAttack() - a.card.getAttack());
            }
        }
Exemple #3
0
 public void onDragCardItem(BuildCardListItem item, PointerEventData pointer)
 {
     onDragItem(item.card, pointer.position);
 }