private void Jump(InputAction.CallbackContext context) { if (state == State.Normal || state == State.Slope) { if (currentJumpCount > 0) { rb.AddForce(MathLibrary.CalculateJump(transform.up, rb.velocity), ForceMode.Impulse); currentJumpCount--; } } }
private void Jump(InputAction.CallbackContext context) { if (state == State.Normal || state == State.Slope) { if (currentJumpCount > 0) { rb.AddForce(MathLibrary.CalculateJump(transform.up, rb.velocity), ForceMode.Impulse); currentJumpCount--; } } }