Okay… can someone please just make a quick script, for closing the game, when touching a specific object? no need for fade or anything, just closing the game?
Take what you need from this script, but basically it lets you click on say an “exit” button and quits the game or click on a “load” or “start game” button to load a scene. Also make sure after you apply this script to your exit button object make sure to check the isQuit box in the inspector.
var isQuitButton = false;
function OnMouseEnter()
{
// CHange color of text /
renderer.material.color = Color.red;
}
function OnMouseExit()
{
// CHange color of text /
renderer.material.color = Color.white;
}
function OnMouseUp()
{
// are we dealing witha quit button //
if( isQuitButton )
{
// quit the game //
Application.Quit();
}
else
{
// load level //
Application.LoadLevel(1);
}
}