Пример #1
0
 private bool ShouldExecute(CardExecutor exec, ClientCard card, ExecutorType type, int desc = -1)
 {
     Executor.SetCard(type, card, desc);
     if (card != null &&
         exec.Type == type &&
         (exec.CardId == -1 || exec.CardId == card.Id) &&
         (exec.Func == null || exec.Func()))
     {
         return(true);
     }
     return(false);
 }
Пример #2
0
    public void DealCard()
    {
        for (int i = 0; i < amountOfCardsToDeal; i++)
        {
            if (deck.Count <= 0)
            {
                ResetDeck();
            }

            CardExecutor go = Instantiate(cardPrefab, handDeck.transform).GetComponent <CardExecutor>();
            go.Init(deck.Pop());
        }
    }
Пример #3
0
 private bool ShouldExecute(CardExecutor exec, ClientCard card, ExecutorType type, int desc = -1)
 {
     Executor.SetCard(type, card, desc);
     if (card != null &&
         exec.Type == type &&
         (exec.CardId == -1 || exec.CardId == card.Id) &&
         (exec.Func == null || exec.Func()))
         return true;
     return false;
 }
Пример #4
0
 public void CmdPlayCard(string cardName)
 {
     CardExecutor.PlayCard(connectionToClient, cardName);
 }