public void PlaySound(string soundName = " ")
 {
     if (soundName == " ")
     {
         manager.PerformSound(botPartSounds[0]);
     }
     else
     {
         PartScriptableObject s = Array.Find(botPartSounds, sound => sound.soundName == soundName);
         manager.PerformSound(s);
     }
 }
Beispiel #2
0
 public void PerformSound(PartScriptableObject sound)
 {
     source.pitch = sound.pitch;
     source.PlayOneShot(sound.clip);
 }
 public void PlayBotPartSound(PartScriptableObject sound)//temporary
 {
     //  partSoundSource.pitch = sound.pitch;
     //  partSoundSource.PlayOneShot(sound.clip);
 }