setupVision method

void setupVision({
  1. Color? color,
  2. bool drawVision = false,
  3. bool checkWithRaycast = true,
  4. int countPolygonPoints = 20,
})

Implementation

void setupVision({
  Color? color,
  bool drawVision = false,
  bool checkWithRaycast = true,
  int countPolygonPoints = 20,
}) {
  assert(countPolygonPoints % 2 == 0, 'countPolygonPoints must be even');
  _drawVision = drawVision;
  _checkWithRaycast = checkWithRaycast;
  _countPolygonPoints = countPolygonPoints;
  _paint.color = color ?? Colors.red.withOpacity(0.5);
}