|
Java Code - Start Button
[Back]
Code:
#pragma strict
var StartButton : Texture2D; //Hold 2D Texture
var StartButtonOver : Texture2D; //Hold 2D Texture
function OnMouseDown()
{
//When Left Click go to level 1
Application.LoadLevel("Level 1");
}
function OnMouseEnter()
{
//On mouseEnter change Texture
guiTexture.texture = StartButtonOver;
}
function OnMouseExit()
{
//On mouseExit change Texture
guiTexture.texture = StartButton;
}
var StartButton : Texture2D; //Hold 2D Texture
var StartButtonOver : Texture2D; //Hold 2D Texture
function OnMouseDown()
{
//When Left Click go to level 1
Application.LoadLevel("Level 1");
}
function OnMouseEnter()
{
//On mouseEnter change Texture
guiTexture.texture = StartButtonOver;
}
function OnMouseExit()
{
//On mouseExit change Texture
guiTexture.texture = StartButton;
}