public IUnitCommand Handle(AttackStateContext context) { if (context.Source.Location.IsAdjacentTo(context.Target)) return new AttackCommand(context); return Handle(new MoveStateContext { Source = context.Source, Target = context.Target}); }
public AttackCommand(AttackStateContext attackContext) { _attackContext = attackContext; }