Esempio n. 1
0
        private void CheckVelocity()
        {
            if (_movement)
            {
                float velXZ = _movement.GetVelocityXZ();
                float velY  = _movement.GetVelocityY();

                if (_playerAnimator)
                {
                    if (velXZ > Mathf.Epsilon)
                    {
                        _playerAnimator.SetVelocityXZ(velXZ);
                    }
                    _playerAnimator.SetVelocityY(velY);
                }


                if (_attack)
                {
                    if (_isGrounded)
                    {
                        _attack.SetActiveHitbox(Combat.MultiAttack.Hitbox.FRONT);
                    }
                    else if (velY <= 0.4f)
                    {
                        _attack.SetActiveHitbox(Combat.MultiAttack.Hitbox.BELOW);
                    }
                }
            }
        }