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; } } }