Hi there!
This is my script,
var guiMode: String = “InGame”;
function OnMouseUp(){
{
Time.timeScale = 0;
guiMode = "Paused";
}
}
function OnGUI()
{
if(guiMode == “Paused”)
{
if(GUI.Button(Rect(Screen.width/2-75,Screen.height/2-20,150,30), “Keep Running”))
{
Time.timeScale = 1;
guiMode = "InGame";
print("starting new game...");
}
if(GUI.Button(Rect(Screen.width/2-75,Screen.height/2+20,150,30), "Main Menu"))
{
Time.timeScale = 1;
print(" Running...");
}
}
}
What’s supposed to happen is that when I press a GUI pause button(the script is attached to it) the pause menu starts. But I having trouble because the script wants there to be a “:” at the top where there is a “=”. Did I set this up right? I pulled it mostly from a tutorial. Thanks for the help!
-Rov