using UnityEngine;
using System.Collections;

public class RandomSound : MonoBehaviour
{
	public AudioClip[] sounds;

	public AudioSource source;

	public float minDelay;
	public float maxDelay;

	private IEnumerator Start()
	{
		while(true)
		{
			yield return new WaitForSeconds(Random.Range(minDelay, maxDelay));
			AudioSource.PlayClipAtPoint(sounds[Random.Range(0,sounds.Length)], Camera.main.transform.position, 0.75f);
		}
	}
}