Esempio n. 1
0
 private void PlayShootArrowSound()
 {
     foreach (Sound sound in sounds)
     {
         if (sound.audioClip.name == "shootArrow")
         {
             SoundExtensions.PasteAudioInformation(audioSource, sound);
             audioSource.Play();
             break;
         }
     }
 }
Esempio n. 2
0
 private void Update()
 {
     if (gameManager.currentState == GameManager.GameState.PullArrowPhase)
     {
         if (bowMain.BowPullStrength > 0.5 && bowPullStretchSoundIsPlaying == false)
         {
             foreach (Sound sound in sounds)
             {
                 if (sound.audioClip.name == "bowPullStretch")
                 {
                     SoundExtensions.PasteAudioInformation(audioSource, sound);
                     audioSource.Play();
                     bowPullStretchSoundIsPlaying = true;
                     break;
                 }
             }
         }
         else if (bowMain.BowPullStrength < 0.5)
         {
             bowPullStretchSoundIsPlaying = false;
             audioSource.Stop();
         }
     }
 }
Esempio n. 3
0
 private void OnCollisionEnter(Collision collision)
 {
     SoundExtensions.PasteAudioInformation(audioSource, hitTargetSound);
     audioSource.Play();
 }