button back.js
#pragma
strict
var
backNormal : Texture2D;
var
backHover : Texture2D;
var
beep : AudioClip;
function
Start () {
}
function
OnMouseEnter () {
guiTexture.texture
= backHover;
}
function
OnMouseExit() {
guiTexture.texture
= backNormal;
}
function
OnMouseDown () {
audio.PlayOneShot(beep);
yield
new WaitForSeconds(0.3);
Application.LoadLevel("GuiMenu");
}
No comments:
Post a Comment