IEnumerator StartAction() { GameControl.CurrentAction = this; if (GameActionInfo != null) { yield return(AllComponents.PhasesUI.ShowInfo(GameActionInfo)); } yield return(Animation()); ChooseCardOptionalAction = new ChooseCardAction(new List <CardEffect>(), isOptionalChoice: true, isLoop: true, withPreview: false); CardsEvent.ForEach(c => c.CardLogic.BeginGameActionEvents(this)); if (ChooseCardOptionalAction.ChosenCardEffects.Count > 0) { ChooseCardOptionalAction.AddActionTo(); } if (flow.Count > 0) { yield return(flow.Dequeue().StartAction()); } if (!IsActionCanceled) { yield return(ActionLogic()); ChooseCardOptionalAction = new ChooseCardAction(new List <CardEffect>(), isOptionalChoice: true, isLoop: true); CardsEvent.ForEach(c => c.CardLogic.EndGameActionEvents(this)); if (ChooseCardOptionalAction.ChosenCardEffects.Count > 0) { ChooseCardOptionalAction.AddActionTo(); } if (flow.Count > 0) { yield return(flow.Dequeue().StartAction()); } } GameControl.CurrentAction = ActionParent; if (ActionParent.flow.Count > 0 && !isRunNow) { yield return(ActionParent.flow.Dequeue().StartAction()); } }