Ejemplo n.º 1
0
        public void AddCard(Card card)
        {
            _Hand.Add(card);

            card.Interactable   = true;
            card.OnInteraction += OnInteraction;

            OnCardAdded?.Invoke(this, new OnCardAddedArgs(card));
            OnHandChanged?.Invoke(this, new OnHandChangedArgs(_Hand));
        }
Ejemplo n.º 2
0
        public Card RemoveCard(Card card)
        {
            _Hand.Remove(card);
            card.Interactable   = false;
            card.OnInteraction -= OnInteraction;

            OnCardRemoved?.Invoke(this, new OnCardRemovedArgs(card));
            OnHandChanged?.Invoke(this, new OnHandChangedArgs(_Hand));

            return(card);
        }
Ejemplo n.º 3
0
        public void AddCards(List <Card> cards)
        {
            _Hand.AddRange(cards);

            foreach (var card in cards)
            {
                card.Interactable   = true;
                card.OnInteraction += OnInteraction;
            }

            OnCardsAdded?.Invoke(this, new OnCardsAddedArgs(cards));
            OnHandChanged?.Invoke(this, new OnHandChangedArgs(_Hand));
        }