using UnityEngine;
using System.Collections;

public class Generator : MonoBehaviour {

	public GameObject powerup;
	private int min;
	private int max;


	// Use this for initialization
	void Start () {
		Invoke("generatePowerups", 5f);
	}
	
	private void generatePowerups()
	{
		Instantiate (powerup, GeneratePosition(), Quaternion.identity);
	}

	private Vector3 GeneratePosition()
	{
		int x,z;
		x = UnityEngine.Random.Range (-8,8);
		z = UnityEngine.Random.Range (-8,8);

		return new Vector3 (x, 0, z);
	}

	public void Update()
	{

	}
}
