// Update is called once per frame void Update() { // if (PauseManager.GetIsPaused()) { return; } float spice = 1.0f;//Mathf.Min(1, GameplayState.instance.currentSpiciness); float fadeInNormalized = Mathf.Clamp(fadeInTimer / fadeInDuration, 0.0f, 1.0f); fadeInTimer += Time.deltaTime; for (int i = 0, iLen = ambientSounds.Count; i < iLen; ++i) { AmbientSound ambientSound = ambientSounds[i]; ambientSound.Update(spice, fadeInNormalized); } }