hey guys i am making a main menu but i am having a problem
the problem is that i can only load the first level and quit the game but i want to be able to load my controls here is the script
var isQuitButton = false;
var isLoadButtoon = false;
var isControlButton = false;
function OnMouseEnter()
{
//change the color of the text
renderer.material.color = Color.red;
}
function OnMouseExit()
{
//change the color of the text
renderer.material.color = Color.white;
}
function OnMouseUp()
{
//are we dealing with a Quit Button?
if( isQuitButton )
{
//quit the game
Application.Quit();
}
{
//are we dealing with a Laod Button?
if( isLoadButton )
{
//load level
Application.LoadLevel(1);
}
//are we dealing with a Control Button?
if( isControlButton )
{
//load level
Application.LoadLevel(2);
}
}
if some on could help me i would really appreciate it
if you need more information just message me or leave a
Ok, This works on mine, so if you do a copy and past it should fix it.
var isQuitButton = false;
var isLoadButton = false;
var isControlButton = false;
function OnMouseEnter()
{
//change the color of the text
renderer.material.color = Color.red;
}
function OnMouseExit()
{
//change the color of the text
renderer.material.color = Color.white;
}
function OnMouseUp()
{
//are we dealing with a Quit Button?
if( isQuitButton )
{
//quit the game
Application.Quit();
}
//are we dealing with a Laod Button?
if( isLoadButton )
{
//load level
Application.LoadLevel(1);
}
//are we dealing with a Control Button?
if( isControlButton )
{
//load level
Application.LoadLevel(2);
}
}