using UnityEngine;
using System;
using System.Collections;

public class DrawGridScript : MonoBehaviour {
	private Rect gridRect = new Rect(0.0f, 0.0f, 1.0f, 1.0f);
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {

	}

	private void drawGrid(float i, float j){
		Gizmos.color = Color.grey;
		Gizmos.DrawLine (new Vector3 (i, 0.0f, j), new Vector3 ((i + 1.0f), 0.0f, j));
		Gizmos.DrawLine (new Vector3 ((i + 1.0f), 0.0f, j), new Vector3 ((i + 1.0f), 0.0f, (j + 1.0f)));
		Gizmos.DrawLine (new Vector3 ((i + 1.0f), 0.0f, (j + 1.0f)), new Vector3 (i, 0.0f, (j + 1.0f)));
		Gizmos.DrawLine (new Vector3 (i, 0.0f, (j + 1.0f)), new Vector3 (i, 0.0f, j));
	}
	void OnDrawGizmos(){
		for (float i = -10.0f; i < 10.0f; i++) {
			for(float j = -10.0f; j < 10.0f; j++) {
				drawGrid(i, j);
			}
		}
	}
}