コード例 #1
0
 public AudioEventClip(AudioClip clip, FloatMinMax volumeMinMax, FloatMinMax pitchMinMax)
 {
     this.clip = clip;
     volume    = volumeMinMax.Clamped(0, 1);
     pitch     = pitchMinMax.Clamped(-3, 4);
 }
コード例 #2
0
 public void GetSound(out AudioClip clip, out float volume, out float pitch)
 {
     clip   = clips[Random.Range(0, clips.Length)];
     volume = Random.Range(this.volume.min, this.volume.max);
     pitch  = Random.Range(this.pitch.min, this.pitch.max);
 }