void Awake() { trackManager = GetComponent <trackManager>(); Reset(); GameObject[] findcars = GameObject.FindGameObjectsWithTag("Player"); foreach (GameObject findcar in findcars) { carController car = findcar.GetComponent <carController>(); if (car && !cars.Contains(car)) { cars.Add(car); } } }
private void Awake() { self = this; }