Esempio n. 1
0
    /// <summary>
    /// drawing a card from players deck
    /// </summary>
    /// <returns>top card of the player</returns>
    public Card DrawCard(GameManager.EDrawType drawType, UnityAction OnDrawCompleted = null)
    {
        if (Deck.Count == 0)
        {
            GameState = EPlayerGameState.lost;
            OnDeckEmpty.Invoke();
        }
        Card c = Deck.Dequeue();
        GameCardController gameCardController = GenerateCard(c);

        gameCardController.DrawCard(drawType, OnDrawCompleted);
        m_ActiveGameCards.Add(gameCardController);
        return(c);
    }
Esempio n. 2
0
 /// <summary>
 /// Drawing a card from the deck
 /// </summary>
 /// <param name="drawType"></param>
 /// <param name="OnDrawCompleted"></param>
 public void DrawCard(GameManager.EDrawType drawType, UnityAction OnDrawCompleted = null)
 {
     m_OnDrawComplete = OnDrawCompleted;
     m_AnimController.SetTrigger(drawType.ToString());
 }