Exemple #1
0
    public void PlayStep()
    {
        if (!_characterController.IsPlayerOnGround())
        {
            return;
        }

        footstep.Play();
    }
 private void HandleAnimation()
 {
     _animator.SetFloat("MoveSpeed", _moveSpeed);
     _animator.SetBool("IsSprinting", _characterController.IsPlayerSprinting());
     _animator.SetBool("OnGround", _characterController.IsPlayerOnGround());
     _animator.SetBool("Jump", _characterController.DidPlayerJump());
     _animator.SetBool("DoubleJump", _characterController.DidPlayerDoubleJump());
     _animator.SetBool("WindAbility", _playerAbility.IsAbilityBeingPressed(Weather.Wind));
     _animator.SetBool("FrostAbility", _playerAbility.IsAbilityBeingPressed(Weather.Frost));
     _animator.SetBool("SunAbility", _playerAbility.IsAbilityBeingPressed(Weather.Sun));
     _animator.SetBool("RainAbility", _playerAbility.IsAbilityBeingPressed(Weather.Rain));
 }