Example #1
0
    public void DrawCard()
    {
        if (battleDeck.Count == 0)
        {
            battleDeck = new List <CardBattleData>(discardPile);
            ShuffleDeck(battleDeck);
            discardPile.Clear();
        }

        CardDisplay card = HandCardDisplay.Instance.Add(battleDeck[0]);

        card.data.drawType = DrawType.FromBattleDeck;
        battleDeck.Remove(battleDeck[0]);

        CardEventArgs args = new CardEventArgs(card);

        OnAddCardToHand?.Invoke(this, args);
    }
Example #2
0
    public void DrawCard(CardDisplay card, Vector3 pos)
    {
        CardEventArgs args = new CardEventArgs(HandCardDisplay.Instance.Add(card.data, pos));

        OnAddCardToHand?.Invoke(this, args);
    }