Пример #1
0
 public void PlaySound(AudioClip clip, float volume, float pitch, float minDist, float maxDist)
 {
     audioSource.volume      = NAudio.RemapVolume(volume);
     audioSource.minDistance = minDist;
     audioSource.maxDistance = maxDist;
     audioSource.clip        = clip;
     audioSource.pitch       = pitch;
     audioSource.Play();
 }