Exemplo n.º 1
0
    public void PlayRandomSound(audio_id min, audio_id max, bool loop = false)
    {
        int id = Random.Range((int)min, (int)max + 1);

        audioSources[(int)id].loop = loop;
        audioSources[(int)id].Play();
    }
Exemplo n.º 2
0
 public void StopSound(audio_id id)
 {
     audioSources[(int)id].Stop();
 }
Exemplo n.º 3
0
 public void PlaySound(audio_id id, bool loop = false)
 {
     audioSources[(int)id].loop = loop;
     audioSources[(int)id].Play();
 }