public override void OnCardPointerUp(CardWrapper PlayerCard, PointerEventData eventData)
        {
            AlliedCharacterTimelineView alliedTimeline = BoardCached.AlliedTimeline;

            if (!alliedTimeline.IsPositionInsideBounds(eventData.pointerCurrentRaycast.worldPosition) ||
                !alliedTimeline.TryInsertVisibleCard(PlayerCard))
            {
                alliedTimeline.DestroyInvisibleCard();
                HandCached.AddCard(PlayerCard);
            }
        }
Esempio n. 2
0
        public override void OnCardPointerDown(CardWrapper PlayerCard, PointerEventData eventData)
        {
            PlayerCard.DOStop();

            PlayerCard.SetParent(HandCached.transform.parent);

            if (PlayerCard.State == CardState.Hand)
            {
                HandCached.RemoveCard(PlayerCard);
                DiscardSectionCached.AddCard(PlayerCard);
            }
            else if (PlayerCard.State == CardState.Discard)
            {
                DiscardSectionCached.RemoveCard(PlayerCard);
                HandCached.AddCard(PlayerCard);
            }
        }