Ejemplo n.º 1
0
    public void PlaySound(Sound.SoundName name)
    {
        Sound s = Array.Find(sounds, sound => sound.name == name);

        if (s.source.isPlaying)
        {
            return;
        }
        s.source.Play();
    }
Ejemplo n.º 2
0
    public void PlaySoundOneShot(Sound.SoundName name)
    {
        Sound s = Array.Find(sounds, sound => sound.name == name);

        s.source.PlayOneShot(s.audioClip);
    }