Пример #1
0
 void OnEnable()
 {
     SetRandomLight();
     if (Time.time < PV.startDestroyingTime + 2)
     {
         TrafficLightsScripts.PushUsedTraffic(gameObject);
         //Debug.Log ("Destroying Seconds: " + (int)(Time.time - PV.startDestroyingTime));
     }
 }
Пример #2
0
 void Start()
 {
     PV               = FindObjectOfType <PlayerValue>();
     trafficManager   = FindObjectOfType <TrafficLightsScripts>();
     itemsSpawn       = FindObjectOfType <ItemSpawn>();
     time             = 0f;
     PV.colorOfPlayer = PlayerPrefs.GetInt("colorOfPlayer");
     charGWalking.SetActive(false);
     charYWalking.SetActive(false);
     charRWalking.SetActive(false);
     ChooseColor();
 }