Esempio n. 1
0
 private void Start()
 {
     maxSpeed        = 2f;
     maxSpeedTraffic = TrafficSettings.orangeSpeed;
     trafficColor    = GameObject.Find("Ground (Traffic)").GetComponent <TrafficColor> ();
     trafficColor.SetColorGreen();
 }
Esempio n. 2
0
    private void OnTriggerExit(Collider other)
    {
        if (other.gameObject.tag == "Sphere")
        {
            if (sphere == null)
            {
                sphere = other.gameObject.GetComponent <SphereControl> ();
            }

            trafficColor.SetColorGreen();
            sphere.SetMaxSpeed(maxSpeed);
        }
    }