Trigger code
function OnTriggerEnter()
{
audio.Play();
}
function OnTriggerExit()
{
audio.Stop();
}
Interactive code
function OnMouseDown()
{
audio.Play();
}
function OnMouseUp()
{
audio.Stop();
}
Collision code
function OnCollisionEnter()
{
audio.Play();
}
No comments:
Post a Comment