// Start is called before the first frame update void Start() { globalTimer = GameObject.FindGameObjectWithTag("globalTimer").GetComponent <GlobalTimerScript>(); //Rotate toward second node in path this.transform.LookAt(nodes[3].position); this.tag = spawner.carTags[pathNumber]; this.transform.Find("Body").tag = spawner.carTags[pathNumber]; maxWheelTorque = 80f; maxBreakTorque = 200f; }
void Start() { //Debug.Log(transition.name); if (SceneManager.GetActiveScene().buildIndex == 0) { startSUT.onClick.AddListener(GoToSimulationSUT); startNonSUT.onClick.AddListener(GoToSimulationNonSUT); } if (SceneManager.GetActiveScene().buildIndex == 1 || SceneManager.GetActiveScene().buildIndex == 2) { valueHolder = GameObject.FindGameObjectWithTag("valueHolder").GetComponent <ValueHolderScript>(); globalTimer = GameObject.FindGameObjectWithTag("globalTimer").GetComponent <GlobalTimerScript>(); } }