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)); }
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)); }
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)); } }
/// <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)); }
public ExitStageAction(MapCell cell, StageExit exit) { Trigger = new ActionCellInputTrigger(cell.Index, InputFunction.Move); SelfEffects.Add(new ExitStageEffect(exit)); }