예제 #1
0
        protected override IEnumerator execute()
        {
            Command presentMove = null;

            if (this.overrideCurve != null)
            {
                IDictionary <DataComposition, VisibilityConfiguration> cards = SampleUtil.GetCards(MatchCardLayer.GameplayAnimation);
                presentMove = new PlayCardAnimation(CardAnimations.Get().GetMoveAnimation(MatchCardLayer.GameplayAnimation, cards, this.card.get_Composition(), this.overrideCurve));
            }
            else if (this.isPlayerOne)
            {
                presentMove = MoveAnimations.Find().GetAnim(this.card, MatchCurves.EndPoint.Player1Deck, MatchCurves.EndPoint.Player1PresentRight, MatchCardLayer.GameplayAnimation);
            }
            else
            {
                presentMove = MoveAnimations.Find().GetAnim(this.card, MatchCurves.EndPoint.Player2Deck, MatchCurves.EndPoint.PresentCenter, MatchCardLayer.GameplayAnimation);
            }
            if (this.message != null)
            {
                Finder.FindOrThrow <FailFeedbackUGUI>().Show(new LocalizedString(this.message, new object[0]));
            }
            this.presentArea.set_Card(this.card);
            RendererManager render = Finder.FindOrThrow <RendererManager>();

            render.Register(this);
            while (presentMove.MoveNext())
            {
                object obj = presentMove.Current;
                yield return(obj);
            }
            yield return(new WaitForSeconds(0.75f));

            ShowCardDeath deathFX = new ShowCardDeath(this.card.get_Composition(), (this.message != null) ? (Constants.rO() + "2") : Constants.rO(), this.commandToRun);

            while (deathFX.MoveNext())
            {
                object obj2 = deathFX.Current;
                yield return(obj2);
            }
            this.presentArea.set_Card(null);
            render.Unregister(this);
            yield break;
            yield break;
        }