Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     tiempoViaje = GameObject.Find("Contador").GetComponent <Contador_viaje>();
     if (col.gameObject.name == "auto rojo" && tiempoViaje.isInicio(this.gameObject.name))
     {
         tiempoViaje.iniciarViaje();
         resetMarcadorIni();
     }
 }
Ejemplo n.º 2
0
 void Start()
 {
     marcador_fin = GameObject.Find("destinoMarker");
     tiempoViaje  = GameObject.Find("Contador").GetComponent <Contador_viaje>();
 }