I have this script:
var audioo : AudioClip;
function Update() {
if (iPhoneInput.acceleration.magnitude > 2f){
audio.PlayOneShot(audioo);
}
}
When i swing my iphone the audio plays 10 times. How can i make it to where audio can only play if last audioclip is finished playing?