using UnityEngine;
using System.Collections;

public class Apparition : MonoBehaviour {
	public float timerMax;
	private float timer;
	public GameObject[] ennemi;

	void Start () {
		timer = 0;
		timerMax = 2f;
	}
	
	void Update () {
		timer += Time.deltaTime;
		if (timer >= timerMax) {
			Instantiate(ennemi[Random.Range(0,2)],transform.position,Quaternion.identity);
			timer=0;
		}	
	}
}
