Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    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;
    }
Ejemplo n.º 3
0
 void Start()
 {
     carController = GameObject.FindObjectOfType(typeof(CarControllerAutomatic)) as CarControllerAutomatic;
 }