Пример #1
0
    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();
    }
Пример #2
0
 public void FadeIn(TimeSpan duration) => CurrentMusic?.FadeIn(duration);