Ejemplo n.º 1
0
        void HandleSkidding()
        {
            float skidIntensity = m_myCar.GetSkidInfo();

            skidIntensity = Mathf.Clamp(skidIntensity, 0, 1.1f);

            m_skidSounds.volume = Mathf.Lerp(m_skidSounds.volume, skidIntensity * 0.5f, 5 * Time.deltaTime);
            //skidSounds.pitch = Mathf.Lerp(skidSounds.pitch, 0.8f + (skidIntensity * 0.3f), 0.1f * Time.deltaTime);

            if (m_myCar.InMidAir)
            {
                //skidSounds.volume = 0;
            }
        }