Esempio n. 1
0
 private void CheckIfJumpEnds()
 {
     if (_anim.GetBool(AnimationParameters.IsJumpingMidair) && _rigidbody.velocity.y < 0)
     {
         float endJumpAnimTime = AnimationUtility.AnimationClipWithName(_anim, AnimationParameters.JumpLandingName).length;
         if (!IsOpenForMove(Vector3.down, Mathf.Abs(_rigidbody.velocity.y * endJumpAnimTime)))
         {
             _anim.SetBool(AnimationParameters.IsJumpingMidair, false);
         }
     }
 }