private IEnumerator AnimateMove(MoveAction action) { var combatant = action.Combatant; yield return(StartCoroutine(View.MoveUnit(combatant.Id, action.Path))); ActionAnimationCompleteSignal.Dispatch(action); }
public override void Execute() { Model.State = BattleUIState.EventPlaying; Model.EventsThisActionPhase.Add(Tile.EventName); var poiFactory = new PointOfInterestFactory(Model.Dimensions); var interaction = new InteractAction(Tile, Model.SelectedCombatant, Model.Map); var pointOfInterest = interaction.GetPointofInterest(poiFactory); Retain(); Action panListener = null; panListener = new Action(() => { Release(); CameraPanCompleteSignal.RemoveListener(panListener); ActionAnimationCompleteSignal.Dispatch(new InteractAction(Tile, Model.SelectedCombatant, Model.Map)); }); CameraPanCompleteSignal.AddListener(panListener); PanToPointOfInterestSignal.Dispatch(pointOfInterest); }
private IEnumerator AnimateFight(FightAction action) { yield return(StartCoroutine(View.AnimateFight(action.Fight))); ActionAnimationCompleteSignal.Dispatch(action); }