using UnityEngine;
using System.Collections;

public class CreateObjectGrid : MonoBehaviour
{

	public int xSize, ySize;
	public GameObject objectToCreate;
	public float separation;

	void Start ()
	{
		for (int i = 0; i < xSize; i++)
		{
			for (int j = 0; j < ySize; j++)
			{
				Instantiate(objectToCreate, transform.position +
				            new Vector3((float)i * separation, (float)j * -1f * separation, transform.position.z),
				            Quaternion.identity);
			}
		}
	}

	void Update ()
	{

	}
}
