Ejemplo n.º 1
0
        private IEnumerator AnimateMove(MoveAction action)
        {
            var combatant = action.Combatant;

            yield return(StartCoroutine(View.MoveUnit(combatant.Id, action.Path)));

            ActionAnimationCompleteSignal.Dispatch(action);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        private IEnumerator AnimateFight(FightAction action)
        {
            yield return(StartCoroutine(View.AnimateFight(action.Fight)));

            ActionAnimationCompleteSignal.Dispatch(action);
        }