Example #1
0
    public bool ChooseCard(int index, CardInteraction cardInteraction)
    {
        Card cardToUse     = hand[index];
        bool cardCanBeUsed = GameController.Instance.TryUseCard(this, cardToUse);

        if (!cardCanBeUsed)
        {
            return(false);
        }

        hand.RemoveAt(index);
        cardObjects.RemoveAt(index);
        cardInteraction.MoveToUsedCards();

        SortHand();
        RefreshCardsObjects();
        SetInteractivity(false);

        return(true);
    }