September 2010
Beginner
384 pages
8h 49m
English
Let's drop a couple of lines into the FallingObjectScript to fire off a few sounds:
clip1 variable at the top of the script:var prefab:GameObject; var clip1:AudioClip;
clip1 sound:if(transform.position.y < 0)
{
audio.PlayOneShot(clip1);
By now, you've probably guessed that there's one more step involved. The script really has no idea what clip1 actually is it's just a variable placeholder. Let's add some actual sound files to the Bomb and Stein prefabs to get this party started:
Read now
Unlock full access