public void PlaySound(Sound.SoundName name) { Sound s = Array.Find(sounds, sound => sound.name == name); if (s.source.isPlaying) { return; } s.source.Play(); }
public void PlaySoundOneShot(Sound.SoundName name) { Sound s = Array.Find(sounds, sound => sound.name == name); s.source.PlayOneShot(s.audioClip); }