using UnityEngine;
using System.Collections;
public class Block_Script : MonoBehaviour {
private GameObject block;
private float paddingHeight = Screen.height / 100 * 20,
padding = Screen.width / 100 * 5,
width = Screen.width / 100 * 19;
private float paddingTop;
private float paddingLeft;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnGUI () {
paddingTop = paddingHeight + padding;
paddingLeft = padding;
for (int i = 0; i < 16; i++) {
if (i % 4 == 0) {
paddingTop += padding + width;
paddingLeft = padding;
}
if (GUI.Button (new Rect (paddingLeft, paddingTop, width, width), "")) {
print ("You clicked me!");
}
paddingLeft += padding + width;
}
}
}