private void Start() { if (TryGetComponent(out manualCarController) && manualCarController.enabled) { isManual = true; } if (!isManual) { automaticCarController = GetComponent <CarControllerAutomatic>(); } m_HighAccel = SetUpEngineAudioSource(highAccelClip); m_LowAccel = SetUpEngineAudioSource(lowAccelClip); m_LowDecel = SetUpEngineAudioSource(lowDecelClip); m_HighDecel = SetUpEngineAudioSource(highDecelClip); }
void Start() { manualCarController = GameObject.FindObjectOfType(typeof(MainCarController)) as MainCarController; if (manualCarController != null && manualCarController.enabled) { isManual = true; } if (!isManual) { automaticCarController = GameObject.FindObjectOfType(typeof(CarControllerAutomatic)) as CarControllerAutomatic; } SetHighlight(start, false); SetHighlight(off, true); carStarted = false; }
void Start() { carController = GameObject.FindObjectOfType(typeof(CarControllerAutomatic)) as CarControllerAutomatic; }