Answers for "how to make something jump in pygame"

0

how to make something jump in pygame

IsJump = False
Jumpcount = 7

if not(Is_Jump):
		if keys[pygame.K_SPACE]:
			Is_Jump = True
	else:
		if JumpCount >= -7:
			neg = 1.5

			if JumpCount < 0:
				neg = -1.5

			guy.y -= (JumpCount ** 2) * 0.5 * neg
			JumpCount -= 1
		else:
			Is_Jump = False
			JumpCount = 7
"You can change how high you jump by changing JumpCount"
Posted by: Guest on July-18-2021

Code answers related to "how to make something jump in pygame"

Browse Popular Code Answers by Language