var mySkin : GUISkin;

var firstLevel : String;
var firstTutorial : String;

var showHelp : boolean = false;

var nextLevel : String;

private var totalTiles = 10;
private var tilesFound = 0;

private var levelDone = false;
private var nextLevelTime = 0.0;

private var defaultHelp = "Move - A, W, S, D, main joystick\nOrbit Camera - Q, E, R, F, secondary joystick\nReset Camera - TAB, Joypad button 3 \nJump - SPACE, Joypad button 4\nUse Glimpse - G, Joypad button 1\nF1 - Toggle Help, Joypad button 2\n\nThe Joypad is the recommended controller! :)\nPlay through the tutorials to learn how to play the game.";

private var random = 0.0;
private var randomDone = false;

function Update () {
}

function Start() {
}

function OnGUI () {
	GUI.skin = mySkin;
	
	var w = Screen.width;
	var h = Screen.height;
	if (w < 1024 && h < 768) {
		GUI.matrix = Matrix4x4.TRS (Vector3.zero, Quaternion.identity, Vector3(w / 1024.0, h / 768.0, 1)); 
		w = 1024;
		h = 768;
	} else if (w < 1024) {
		GUI.matrix = Matrix4x4.TRS (Vector3.zero, Quaternion.identity, Vector3(w / 1024.0, 1, 1)); 
		w = 1024;
	} else if (h < 768) {
		GUI.matrix = Matrix4x4.TRS (Vector3.zero, Quaternion.identity, Vector3(1, h / 768.0, 1)); 
		h = 768;
	}  
  
	
	if (GUI.Button (Rect (w/4,h/4,w/2,h/7), "Tutorials")) {
		Application.LoadLevel(firstTutorial);
	}
	if (GUI.Button (Rect (w/4,h/4 + h/6,w/2,h/7), "Start Game")) {
		Application.LoadLevel(firstLevel);
	}
	if (GUI.Button (Rect (w/4,h/4 + 2*h/6,w/2,h/7), "Exit")) {
		Application.Quit();
	}


if (levelDone) {
		GUI.Label (Rect (w / 2 - 200, h / 2  - 50, 400, 1000), "LEVEL COMPLETE!");
	}
}
