Saturday 17 January 2015

Contoh Script java button back pada UNity3D

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");

}

Download script Link1 / Link2

No comments:

Post a Comment