예제 #1
0
        private IEnumerator ChuckWenganCoroutine()
        {
            DisableCards();
            EnableConfirmButton(true);
            EnableCancelButton(true);
            WaitForDecision decision = new WaitForDecision(this, Decision.Cancel);

            yield return(decision);

            if (decision.Decision == Decision.Confirm)
            {
                hp--;
                Draw(2);
            }
            EnableCancelButton(false);
            EnableConfirmButton(false);
            EnableCardsPlay();
        }
예제 #2
0
        private IEnumerator StartDiscarding()
        {
            WaitForDecision waitForDecision = new WaitForDecision(this, Decision.Cancel);

            yield return(waitForDecision);

            if (waitForDecision.TimeUp)
            {
                StopDiscarding();
            }
            else if (waitForDecision.Decision == Decision.Cancel)
            {
                StopDiscarding(true);
            }
            else if (waitForDecision.Decision == Decision.Confirm)
            {
                yield return(SpecialActionEvent());
            }
        }
예제 #3
0
        public override IEnumerator UsedCard <T>(int player)
        {
            if (typeof(T) == typeof(Beer) && player != PlayerNumber)
            {
                State previousState = State;
                State = State.SpecialEvent;
                EnablePassButton(true);
                EnableAllCards();
                WaitForDecision timer = new WaitForDecision(this);
                yield return(timer);

                if (timer.Decision == Decision.Heal)
                {
                    yield return(PimPamPumEvent(this + " has used his special ability and healed 1 HP."));
                }
                DisableCards();
                EnablePassButton(false);
                if (previousState == State.Play)
                {
                    Phase2();
                }
            }
        }