var radius : float;
var delay : float;
var nextTime : float;
var targetPrefabs : GameObject[];

function Start(){
	CalcNextTime();
}


function Update () {
	if(Time.time > nextTime){
		CalcNextTime();
		Instantiate(targetPrefabs[Random.Range(0,targetPrefabs.length)], transform.position + Random.insideUnitSphere * radius, Random.rotation);
	}
}

function CalcNextTime(){
	nextTime = Time.time + Random.Range(delay*0.5, delay*1.5);
}