Exemplo n.º 1
0
 public MoveCellAction(Element actor, MapCell cell) : base("Move")
 {
     Target     = actor;
     _CellIndex = cell.Index;
     Trigger    = new ActionCellInputTrigger(cell.Index, InputFunction.Move);
     SelfEffects.Add(new ActorOrientationEffect(actor, cell));
     SelfEffects.Add(new MoveCellEffect(cell.Index));
 }
Exemplo n.º 2
0
        public BumpAttackAction(Element target, MapCell cell, Vector direction)
        {
            Target  = target;
            Trigger = new ActionCellInputTrigger(cell.Index, InputFunction.Move);

            Effects.Add(new SFXImpactEffect());
            Effects.Add(new DamageEffect(1));
            Effects.Add(new KnockbackEffect(direction, 2));
            SelfEffects.Add(new ActorOrientationEffect(direction));
        }
Exemplo n.º 3
0
        public AOEAttackAction(IList <MapCell> targets, MapCell triggerCell, Vector direction,
                               string sfxKeyword = null)
        {
            Target  = targets;
            Trigger = new ActionCellInputTrigger(triggerCell.Index, InputFunction.Move);

            Effects.Add(new SFXImpactEffect());
            Effects.Add(new DamageEffect(2));
            Effects.Add(new KnockbackEffect(direction, 3));
            SelfEffects.Add(new ActorOrientationEffect(direction));
            if (sfxKeyword != null)
            {
                SelfEffects.Add(new SFXEffect(sfxKeyword, true, direction));
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Get the action assigned to the specified user input function
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public GameAction ActionForInput(InputFunction input, int cellIndex)
        {
            var trigger = new ActionCellInputTrigger(cellIndex, input);

            return(Actions.FirstMatch(trigger));
        }
Exemplo n.º 5
0
 public ExitStageAction(MapCell cell, StageExit exit)
 {
     Trigger = new ActionCellInputTrigger(cell.Index, InputFunction.Move);
     SelfEffects.Add(new ExitStageEffect(exit));
 }