/// <summary>
    /// Runs on the initial load of this script
    /// </summary>
    private void Start()
    {
        SensorManager        = SensorManager.Instance;
        TrafficLightManager  = TrafficLightManager.Instance;
        SpecialObjectManager = SpecialObjectManager.Instance;
        TrafficSpawnManager  = TrafficSpawnManager.Instance;
        PathName             = Path.PathSequence[0].parent.parent.parent.name;
        LightName            = GetCurrentTrafficlight();

        //Make sure there is a path assigned
        if (Path == null)
        {
            Debug.LogError("Movement Path cannot be null, I must have a path to follow.", gameObject);
            return;
        }
    }
Exemple #2
0
 // Start is called before the first frame update
 private void Start()
 {
     this.TrafficSpawnManager = TrafficSpawnManager.Instance;
     this.MqttManager         = MqttManager.Instance;
 }