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