Beispiel #1
0
    //  plays the audio for name provided
    public void play(string name)
    {
        sound s = Array.Find(sounds, sound => sound.name == name);

        //  PURHAPS NEED TO DELAY THE IS PLAYING BY RANDOM VALUES??
        //  NEED TO FIGURE THIS OUT!
        if (s == null && !(s.isplaying()))
        {
            Debug.Log("sound: " + name + " is not found ");
            return;
        }
        s.source.Play();
    }