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