/// <summary> /// Initializes a new instance of the <see cref="PathingEngineBase"/> class. /// </summary> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="smoother">The path smoother to use</param> protected PathingEngineBase(IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths smoother) { Ensure.ArgumentNotNull(moveCostProvider, "moveCostProvider"); Ensure.ArgumentNotNull(cellCostStrategy, "cellCostStrategy"); Ensure.ArgumentNotNull(smoother, "smoother"); _costProvider = moveCostProvider; _smoother = smoother; _cellCostStrategy = cellCostStrategy; _coroutineIter = new SafeIterator(this); }
/// <summary> /// Initializes a new instance of the <see cref="PathingEngineBase"/> class. /// </summary> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="smoother">The path smoother to use</param> protected PathingEngineBase(IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths smoother) { Ensure.ArgumentNotNull(moveCostProvider, "moveCostProvider"); Ensure.ArgumentNotNull(cellCostStrategy, "cellCostStrategy"); Ensure.ArgumentNotNull(smoother, "smoother"); _costProvider = moveCostProvider; _smoother = smoother; _cellCostStrategy = cellCostStrategy; _coroutineIter = new SafeIterator(this); }
/// <summary> /// Initializes a new instance of the <see cref="PathingEngineBase"/> class. /// </summary> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="cellCostStrategy">The cell cost provider.</param> /// <param name="smoother">The path smoother to use</param> /// <param name="requestPreprocessors">The list of request preprocessors to use.</param> protected PathingEngineBase(IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths smoother, IRequestPreProcessor[] requestPreprocessors) { Ensure.ArgumentNotNull(moveCostProvider, "moveCostProvider"); Ensure.ArgumentNotNull(cellCostStrategy, "cellCostStrategy"); Ensure.ArgumentNotNull(smoother, "smoother"); _costProvider = moveCostProvider; _smoother = smoother; _cellCostStrategy = cellCostStrategy; _coroutineIter = new SafeIterator(this); _segmentRequest = new SegmentRequest(); _segments = new DynamicArray <Path>(10); _requestPreprocessors = requestPreprocessors; }