- Home /
I need help with a Text Location script (Ho bisogno di aiuto con uno script di posizione del testo)
(eng) Hello everyone, I state that I translate with a web translator, being Italian, I have a problem with a RaceManager script, the script is linked to a Car script, they work properly, I just can't seem to extrapolate the positions, everything I managed to do and extrapolate the number of cars present and the name of the first car at the start, please help me I'm getting crazy, I would just need to view the name of the cars in the correct order, or the number of the first player's position, I would prefer the names of the cars, I ask you to add some scripts in the explanation or the script to use, because I am a novice and translating with a web translator it is very difficult for me to understand what you are saying to me, I thank you in advance. (ita) salve a tutti, premetto che traduco con un traduttore web, essendo italiano ,ho un problema con uno script RaceManager, lo script e collegato ad un script Car, essi funzionano correttamente,solo che non riesco ad estrapolarre le posizioni ,tutto cio che sono riuscito a fare e estrapolare il numero di auto presenti e il nome della prima auto allo start, vi prego aiutatemi sto diventando pazzo, a me basterebbe anche solo visualizare il nome delle auto nel ordine corretto ,o il numero della posizione del primo giocatore ,preferirei i nomi delle auto ,vi chiedo di aggiungere qualche script nella spiegazione o lo script da usare, perché sono novizio e traducendo con traduttore web mi è molto difficile capire cosa mi state dicendo, vi ringrazzio in anticipo.
using UnityEngine; using System.Collections; using UnityEngine.UI;
public class RaceManager : MonoBehaviour { public Car[] allCars; public Car[] carOrder; public GameObject posizione;
public void Start() { // set up the car objects carOrder = new Car[allCars.Length]; InvokeRepeating("ManualUpdate", 0.5f, 0.5f);
}
// this gets called every frame public void ManualUpdate() { foreach (Car car in allCars) { carOrder[car.GetCarPosition(allCars) - 1] = car;
} posizione.GetComponent().text = "" + allCars.Length; }
}
Your answer
Follow this Question
Related Questions
I need help with a Text Location script (Ho bisogno di aiuto con uno script di posizione del testo) 0 Answers
What is the Input Key for the Steam Vive triggers? 1 Answer
Why Do My Obstacles Do This In My Object Pooler? 1 Answer
Why i'm getting UnassignedReferenceException when running the game ? 1 Answer