예제 #1
0
    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);
    }
예제 #2
0
        /// <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);
        }
예제 #3
0
    /// <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);
    }