void Start() { txtCompteur = GetComponent <Text>(); //à chaque seconde appelle Compteur InvokeRepeating("Compteur", 1, 1); //va chercher l'helice GameObject helice = GameObject.FindGameObjectWithTag("helice"); scriptHelice = helice.GetComponent <TourneObjet>(); //va chercher le vehicule GameObject vehicule = GameObject.FindGameObjectWithTag("Vehicule"); scriptVehicule = vehicule.GetComponent <DeplaceVehicule>(); }
// Start is called before the first frame update void Start() { scriptHelico = helico.GetComponent <DeplaceVehicule>(); }