Example #1
0
        protected override void Execute()
        {
            MovePathAction               ma  = new MovePathAction(this.Source, path, this.Source.Module <MoveModule>().MoveDuration);
            AttackUnitAction             aa  = new AttackUnitAction(this.attackUnit);
            PlayerDeclareMoveAttackEvent evt = new PlayerDeclareMoveAttackEvent(player, (UnitEntity)this.Source, this.attackUnit, ma, aa);

            this.EventManager.Raise(evt);
        }
 public PlayerDeclareMoveAttackEvent(Player player, UnitEntity ent, UnitEntity attackEnt, MovePathAction ma = null, AttackUnitAction aa = null)
 {
     this.player       = player;
     this.ma           = ma;
     this.ent          = ent;
     this.aa           = aa;
     this.attackEnt    = attackEnt;
     this.AttackAction = aa;
 }
Example #3
0
        private void PerformMoves()
        {
            MultiAction ma = new MultiAction();

            foreach (PlayerDeclareMoveAttackEvent evt in this.moveAttackDeclaration.Values)
            {
                MovePathAction mpa = evt.MoveAction;
                ma.AddAction(mpa);
            }
            ma.Resolved += (sender, maEvt) => SkipToPhase(Phases.React, this.playersTurn);
            this.ActionManager.Queue(ma);
        }