void Update()
 {
     if (controller.EngineOn)
     {
         fanAudio.Set(controller.GetFan() ? 1f : 0.0f);
     }
     else
     {
         fanAudio.Set(0.0f);
     }
 }
Example #2
0
        void Update()
        {
            if (!controller)
            {
                return;
            }

            if (controller.GetEngineRunning())
            {
                fanAudio.Set(controller.GetFan() ? 1f : 0.0f);
            }
            else
            {
                fanAudio.Set(0.0f);
            }
        }