Beispiel #1
0
        /// <summary>
        /// 播放OneShoot音效
        /// </summary>
        /// <param name="clip">音效剪辑</param>
        /// <param name="volumeScale">音量缩放比</param>
        public void PlayOneShoot(AudioClip clip, float volumeScale = 1)
        {
            if (clip == null)
            {
                return;
            }

            OneShootSource.PlayOneShot(clip, volumeScale);
        }
Beispiel #2
0
        /// <summary>
        /// 播放OneShoot音效
        /// </summary>
        /// <param name="clip">音效剪辑</param>
        public void PlayOneShoot(AudioClip clip)
        {
            if (clip == null)
            {
                return;
            }

            OneShootSource.PlayOneShot(clip);
        }
 /// <summary>
 /// 播放OneShoot音效
 /// </summary>
 /// <param name="clip">音效剪辑</param>
 public void PlayOneShoot(AudioClip clip)
 {
     OneShootSource.PlayOneShot(clip);
 }
 /// <summary>
 /// 播放OneShoot音效
 /// </summary>
 /// <param name="clip">音效剪辑</param>
 /// <param name="volumeScale">音量缩放比</param>
 public void PlayOneShoot(AudioClip clip, float volumeScale = 1)
 {
     OneShootSource.PlayOneShot(clip, volumeScale);
 }