예제 #1
0
        /// <summary>
        /// Prevents given card from being played.
        /// Returns it to user's hand.
        /// </summary>
        private void CancelPlay(MatchMessageCardCanceled message)
        {
            CardGrabber grabber = _cardsInHand[message.CardSlotIndex];

            grabber.OnDragStarted  += StartCardDrag;
            grabber.OnCardReturned += ReturnCard;
            grabber.OnCardPlayed   += PlayCard;
            grabber.CancelPlay();
        }