using UnityEngine;
using System.Collections;

public class Menu : MonoBehaviour {
	bool pause;

	void Update() {
		if (Input.GetKeyDown (KeyCode.Escape)) {
			pause = !pause;
		}
		Time.timeScale = (pause) ? 0 : 1;

	}
	void OnGUI() {

		if(GUI.Button (new Rect (Screen.width - 40, 0, 40, 40), "||")) 
			pause = !pause;
		if(GUI.Button (new Rect (Screen.width - 80, 0, 40, 40), "(*")) 
			Application.LoadLevel(Application.loadedLevel);


	}
}
