This var is needed so the file can be selected in the Inspector window in Unity.
'audio.Play();' shows the audio being played inside the update that triggers the animation.
'audio.clip = swing;' sets the current sound that the 'Audio Source' plays. This allows all of the sounds to use the same audio source. The 'AudioSource' is shown attached under the collisions script, both attached to Gutsy.
No comments:
Post a Comment