public void PlayDelayed(float delay, ExtendedAudioSource source = null) { if (source == null) { source = AudioPool.GetAudioSource(); } source.Setup(this); source.PlayDelayed(delay); }
public void FadeIn(float duration, ExtendedAudioSource source = null) { if (source == null) { source = AudioPool.GetAudioSource(); } source.Setup(this); source.FadeIn(duration); }
public void Pause(ExtendedAudioSource source = null) { if (source == null) { source = AudioPool.GetAudioSource(); } source.Pause(); }
public void Stop(ExtendedAudioSource source = null) { //Get audiosource if (source == null) { source = AudioPool.GetAudioSource(); } source.Stop(); }
public static void FadeOut(Audio audio, float duration) { ExtendedAudioSource source = pool.IsPlaying(audio); if (source != null) { audio.FadeOut(duration, source); } }
public void PlayOnce(ExtendedAudioSource source = null) { if (source == null) { source = AudioPool.GetAudioSource(); } source.Setup(this); source.PlayOnce(); }
public void Play(ExtendedAudioSource source = null) { //Get audiosource if (source == null) { source = AudioPool.GetAudioSource(); } source.Setup(this); source.Play(); }
public static void AudioEndPlaying(ExtendedAudioSource source) { OnAudioEndPlaying?.Invoke(source); }
public void FadeOut(float duration, ExtendedAudioSource source = null) { source.FadeOut(duration); }
public void Resume(ExtendedAudioSource source) { source.Resume(); }
void End(ExtendedAudioSource endSource) { endSource.Reset(); }
public static void Resume(Audio audio, ExtendedAudioSource source) { audio.Resume(source); }
public static void Pause(Audio audio, ExtendedAudioSource source) { audio.Pause(source); }
public static void ReturnToPool(ExtendedAudioSource extendedAudioSource) { AudioEvents.AudioEndPlaying(extendedAudioSource); activeAudioSources.Remove(extendedAudioSource); extendedAudioSource.gameObject.SetActive(false); }
public static void PauseAudio(ExtendedAudioSource source) { OnPauseAudio?.Invoke(source); }
public static void ResumeAudio(ExtendedAudioSource source) { OnResumeAudio?.Invoke(source); }
public void OnEnable() { previewer = EditorUtility .CreateGameObjectWithHideFlags("Audio preview", HideFlags.HideAndDontSave, typeof(ExtendedAudioSource)) .GetComponent <ExtendedAudioSource>(); }