public void PlayMusic(AudioClip music, float volume) { if (_music?.Music == music) { return; } if (_music != null) { _music.FadeAndDestroy(); } _music = new CurrentMusic(_prefab, music, _fadeTime, volume, _curve); _music.FadeIn(); }
public void FadeIn(TimeSpan duration) => CurrentMusic?.FadeIn(duration);