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

            if (controller.GetEngineRunning())
            {
                fanAudio.Set(controller.GetFan() ? 1f : 0.0f);
            }
            else
            {
                fanAudio.Set(0.0f);
            }
        }
Exemplo n.º 3
0
            public bool UpdateFan()
            {
                var temperature = controller.sim.engineTemp.value;

                if (controller.GetFan())
                {
                    fanRunning = true;
                }
                else if (temperature > FanOnThreshold)
                {
                    fanRunning = true;
                }
                else if (temperature < FanOffThreshold)
                {
                    fanRunning = false;
                }
                return(fanRunning);
            }