Пример #1
0
 void HandleFootsteps()
 {
     // if(footstepAudioSource) {
     if (footstepAudioPlayer)
     {
         float footfall = anim.GetFloat(footfallHash);
         if (Time.time - lastFootstepTime > footstepCD && footfall > 0.1f)
         {
             // footstepAudioSource.PlayOneShot(footstepAudioSource.clip);
             footstepAudioPlayer.PlayRandom(null);
             lastFootstepTime = Time.time;
         }
     }
 }