Exemplo n.º 1
0
    public void PlayBGM(AudioBGMType audioBGMType, BGMClipType clipType, float volume = 1f, float delay = 0f)
    {
        AudioSource audioSource = GetBGMSource(audioBGMType);

        audioSource.clip   = GetBGMClip(clipType);
        audioSource.volume = GetVolume(AudioSourceType.Music, volume);
        audioSource.PlayDelayed(delay);
    }
Exemplo n.º 2
0
 // PAUSE
 public void SetPauseBGM(AudioBGMType audioBGMType, bool pause)
 {
     SetPauseAudio(AudioSourceType.Music, (int)audioBGMType, pause);
 }
Exemplo n.º 3
0
 private AudioSource GetBGMSource(AudioBGMType audioBGMType)
 {
     return(_audioSources[(int)AudioSourceType.Music][(int)audioBGMType]);
 }
Exemplo n.º 4
0
 // STOP
 public void StopBGM(AudioBGMType audioBGMType)
 {
     StopAudio(AudioSourceType.Music, (int)audioBGMType);
 }