void Update() { if (_radar.objectDetected) { if (_radar.Distance <= closeDistance) { _drive.Brake(); Debug.Log("Close"); } else if (_radar.Distance <= normalDistance) { Debug.Log("Normal"); } else if (_radar.Distance <= farDistance) { Debug.Log("Far"); } } else { Debug.Log("No objects deteceted"); } }
public void Brake(float throttle) { Drive.Brake(throttle); }