private void Update()
{
if (isGrounded == true && Input.GetKeyUp(KeyCode.Space))
{
BallJump();
}
}
void BallJump() // прыжок вперед
{
Vector2 jjump = new Vector2(rb.velocity.x + speed, rb.velocity.y + jumpForce);
rb.AddForce(jjump, ForceMode2D.Impulse);
}