using UnityEngine;
using System.Collections;
public class menu : MonoBehaviour {
bool flag;
void Update () {
if(Input.GetKeyDown(KeyCode.Escape)){
if(flag){
flag=false;}
else{
flag=true;
}
}
}
void OnGUI(){
if(!flag){
return;
}
if(GUI.Button(new Rect(Screen.width/2-100,Screen.height/2-30,100,60),"俯瞰浏览")){
Application.LoadLevel(0);
}
if(GUI.Button(new Rect(Screen.width/2,Screen.height/2-30,100,60),"场景漫游")){
Application.LoadLevel(1);
}
if(GUI.Button(new Rect(Screen.width/2+100,Screen.height/2-30,100,60),"阶段展示")){
Application.Quit();
print("Quit");
}
}
}