public void PlayClip(AudioClip clip)
    {
        float volume = audioSettings ? audioSettings.GetSfxVolume() : 1f;

        audioSource.clip   = clip;
        audioSource.volume = volume;
        audioSource.Play();
    }
示例#2
0
 public void PlayClip()
 {
     audioSource.volume       = audioSettings != null ? !audioSettings.IsMuted ? audioSettings.GetSfxVolume() : 0f : 1f;
     audioSource.spatialBlend = 1f;
     audioSource.Play();
 }