public void CutAudio() { float volumeBeforeEnding = audio.volume; this.ProgressionAnim(3, (progression) => { audio.volume = Mathf.Lerp(volumeBeforeEnding, 0, AniMath.Smooth(progression)); }); }
void Start() { // Lower the audio after some time in the scene. this.Timer(lowerDelay, () => { this.ProgressionAnim(3, (progression) => { audio.volume = Mathf.Lerp(defaultVolume, lowVolume, AniMath.Smooth(progression)); }); }); }