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); }
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()); } }
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; }
public void CmdPlayCard(string cardName) { CardExecutor.PlayCard(connectionToClient, cardName); }