|
How to make a Music Game - Java Code - Sound
[Back]
Code:
#pragma strict
function Start () {
audio.Play();
sound();
}
function sound ()
{
yield WaitForSeconds (audio.clip.length);
Destroy(gameObject);
}
function Start () {
audio.Play();
sound();
}
function sound ()
{
yield WaitForSeconds (audio.clip.length);
Destroy(gameObject);
}