Пример #1
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);
            }
        }
        public override void OnCardPointerDown(CardWrapper PlayerCard, PointerEventData eventData)
        {
            PlayerCard.DOStop();

            PlayerCard.SetParent(HandCached.transform.parent);
            PlayerCard.AnchoredPosition = eventData.position - PlayerCard.Size / 2;

            AlliedCharacterTimelineView alliedTimeline = BoardCached.AlliedTimeline;

            alliedTimeline.CreateInvisibleCard(PlayerCard);

            if (PlayerCard.State == CardState.Hand)
            {
                HandCached.RemoveCard(PlayerCard);
            }
            else if (PlayerCard.State == CardState.BoardPrePlay)
            {
                alliedTimeline.RemoveCard(PlayerCard);
                alliedTimeline.TryInsertInvisibleCard(PlayerCard);
            }
        }