setup method

void setup({
  1. double? speed,
  2. double? maxDistance,
  3. double? minDistance,
  4. int? timeKeepStopped,
  5. bool? updateAngle,
  6. bool? checkDirectionWithRayCast,
  7. RandomMovementDirections? directions,
})

Implementation

void setup({
  double? speed,
  double? maxDistance,
  double? minDistance,

  /// milliseconds
  int? timeKeepStopped,
  bool? updateAngle,
  bool? checkDirectionWithRayCast,
  RandomMovementDirections? directions,
}) {
  if (speed != null) {
    _speed = speed;
  }
  if (maxDistance != null) {
    _maxDistance = maxDistance;
  }
  if (minDistance != null) {
    _minDistance = minDistance;
  }
  if (timeKeepStopped != null) {
    _intervalTick = IntervalTick(
      timeKeepStopped,
    );
  }
  if (updateAngle != null) {
    _updateAngle = updateAngle;
  }
  if (checkDirectionWithRayCast != null) {
    _checkDirectionWithRayCast = checkDirectionWithRayCast;
  }
  if (directions != null) {
    _directions = directions;
  }
}