Unity Turtorial: 26 Quit Menu !
THIS IS Java# script: GOOD 4 2D GAMES AND 3D GAMES !
--------------------------------------------------------------------------------------
DIRECT DOWNLOAD HERE
THIS IS BACKUP IN TEXT FORM TUTORIAL 26
1. Create New java and name it :
quitMenu
2. Copy & Past this text and save java :
---------------------------------------------------------------------------------
#pragma strict
var quitMenu : boolean = false;
function Start () {
}
function Update () {
if(Input.GetKeyDown(KeyCode.Escape)) {
quitMenu = !quitMenu;
}
}
function OnGUI () {
if(quitMenu == true) {
if(GUI.Button(Rect(600,300,150,50), "Quit Game Yes ?")) {
Application.Quit();
}
}
}
---------------------------------------------------------------------------------
0 comments:
Post a Comment