public AudioSource PlayLongVoiceAudio(AudioClip adClip) { if (null == adClip) { return(null); } AudioSource ads = LongVoiceAudioSourceQueue.Dequeue(); ads.clip = adClip; // ads.volume = 1; ads.Play(); EffectAudioSourceQueue.Enqueue(ads); return(ads); }
/// <summary> /// 播放效果音 /// </summary> /// <param name="adClip"></param> /// <returns></returns> public AudioSource PlayEffectAudio(AudioClip adClip) { if (adClip == null) { return(null); } AudioSource adio = EffectAudioSourceQueue.Dequeue(); adio.clip = adClip; adio.volume = 1.0f; adio.Play(); EffectAudioSourceQueue.Enqueue(adio); return(adio); }
/// <summary> /// 播放声音特效 /// </summary> /// <param name="clip"></param> /// <returns></returns> public AudioSource PlayEffectAudio(AudioClip clip) { if (null == clip) { return(null); } AudioSource ads = EffectAudioSourceQueue.Dequeue(); ads.clip = clip; ads.volume = 1; ads.Play(); EffectAudioSourceQueue.Enqueue(ads); return(ads); }