Esempio n. 1
0
        public override bool MoveNext()
        {
            WaitForCardSelection chooseCardTimer = Current as WaitForCardSelection;

            if (chooseCardTimer != null && chooseCardTimer.ChosenCard != null)
            {
                DrawEffectCard = chooseCardTimer.ChosenCard;
                drawnCards     = chooseCardTimer.Cards;
            }
            if (drawnCards != null && !drawEffectStarted)
            {
                currentCard       = 0;
                maxCards          = drawnCards.Count;
                drawEffectStarted = true;
            }
            if (drawEffectStarted && currentCard < maxCards)
            {
                Current = GameController.Instance.DrawEffect(player, drawnCards[currentCard++]);
                return(true);
            }
            if (maxCards > 0 && currentCard == maxCards)
            {
                return(false);
            }
            return(true);
        }
Esempio n. 2
0
        public IEnumerator ChooseCardToPutOnDeckTop(int player)
        {
            PlayerController pc = playerControllers[player];

            WaitForCardSelection chooseCardTimer = new WaitForCardSelection(pc, 3);

            yield return(chooseCardTimer);

            pc.AddCards(chooseCardTimer.NotChosenCards);
            boardController.AddCardToDeck(chooseCardTimer.ChosenCard);
        }
Esempio n. 3
0
 public DrawEffectCoroutine(PlayerController pc)
 {
     player = pc.PlayerNumber;
     if (pc.DrawEffectCards < 2)
     {
         DrawEffectCard = GameController.Instance.DrawCard();
         drawnCards     = new List <Card>();
         drawnCards.Add(DrawEffectCard);
     }
     else
     {
         Current = new WaitForCardSelection(pc, pc.DrawEffectCards);
     }
 }