setupPathFinding method
void
setupPathFinding({})
Implementation
void setupPathFinding({
bool? linePathEnabled,
/// Use to set line path color
Color? pathLineColor,
Color? barriersCalculatedColor,
/// Use to set line path width
double pathLineStrokeWidth = 4,
/// Use to debug and show area collision calculated
bool showBarriersCalculated = false,
bool useOnlyVisibleBarriers = true,
/// If `false` the algorithm use map tile size with base of the grid. if true this use collision size of the component.
bool gridSizeIsCollisionSize = false,
bool withDiagonal = true,
double factorInflateFindArea = 2,
}) {
_withDiagonal = withDiagonal;
_linePathEnabled = linePathEnabled ?? _linePathEnabled;
_useOnlyVisibleBarriers = useOnlyVisibleBarriers;
_factorInflateFindArea = factorInflateFindArea;
_paintShowBarriers.color =
barriersCalculatedColor ?? const Color(0xFF2196F3).withOpacity(0.5);
_showBarriers = showBarriersCalculated;
_pathLineColor = pathLineColor ?? _pathLineColor;
_pathLineStrokeWidth = pathLineStrokeWidth;
_pathLineColor = pathLineColor ?? const Color(0xFF40C4FF).withOpacity(0.5);
_gridSizeIsCollisionSize = gridSizeIsCollisionSize;
}