public void UnPauseBgm(BgmClip bgm) { for (int i = 0; i < maximumSfxChannel; i++) { if (bgm.audioClip = bgmAudioSource[i].clip) { bgmAudioSource[i].UnPause(); } } }
IEnumerator iePlayBgm(BgmClip bgmClip, float startDelay) { yield return(new WaitForSeconds(startDelay)); int layer = (int)bgmClip.channel; if (bgmAudioSource [(int)bgmClip.channel].clip != bgmClip.audioClip) { bgmAudioSource [layer].clip = bgmClip.audioClip; bgmAudioSource [layer].volume = bgmClip.properties.volumn; bgmAudioSource [layer].pitch = bgmClip.properties.pitch.pitch; bgmAudioSource [layer].playOnAwake = bgmClip.properties.playOnAwake; bgmAudioSource [layer].loop = bgmClip.properties.loop; bgmAudioSource [layer].Play(); } yield return(null); }
public void PlayBgmAt(BgmClip bgm, float time) { bgmAudioSource[(int)bgm.channel].PlayScheduled(time); }
public void PlayBgm(BgmClip bgmClip, float startDelay = 0) { StartCoroutine(iePlayBgm(bgmClip, startDelay)); }
public void ChangeAndPlay(BgmClip bgmClip) { Stop(); Change(bgmClip); PlayThis(bgmClip); }
public void Change(BgmClip bgmClip) { }
public void PlayThis(BgmClip bgmClip) { SoundManager.Instance.PlayBgm(bgmClip); }