// getting a ref to the car private void Start() { car = GetComponent <CarBehaviour>(); }
/// <summary> /// Initialises the neural net controller. /// We get the references to the necessary component and suscribe to some events. /// </summary> protected override void InitialiseController() { car = GetComponent <CarBehaviour>(); sensors = GetComponent <CarSensors>(); car.HitSomething += OnCarHit; }