using UnityEngine;
using System.Collections;

public class AparicionDeClones : MonoBehaviour 
{
	public Transform startingPoint;
	public GameObject clon1;
	//public GameObject clon2;
	public float intervaloTiempoClon1 = 4;
	//public float intervaloTiempoClon2 = 2;



	void Start () 
	{
		StartCoroutine (GeneradorClon1 ());
		//StartCoroutine (GeneradorClon2 ());
	}
	


	IEnumerator GeneradorClon1()
	{
		while (true) 
		{
			yield return new WaitForSeconds (intervaloTiempoClon1);
			Instantiate(clon1, startingPoint.position, startingPoint.rotation);
		}
	}


	/*
	IEnumerator GeneradorClon2()
	{
		while (true) 
		{
			yield return new WaitForSeconds (intervaloTiempoClon1);
			Instantiate(clon2, startingPoint.position, startingPoint.rotation);
		}
	}
	*/
}









