Esempio 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();
    }
Esempio n. 2
0
    public void PlaySoundOneShot(Sound.SoundName name)
    {
        Sound s = Array.Find(sounds, sound => sound.name == name);

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