Commit dc3c0ed8 by BellCodeEditor

save project

parent 8b032bfd
Showing with 7 additions and 4 deletions
......@@ -21,6 +21,7 @@ fps = pygame.time.Clock()
index = 0
jumpstate = 'running'
y = 400
t = 30
while True:
for event in pygame.event.get():
......@@ -35,13 +36,15 @@ while True:
index -= 5
if jumpstate == 'up':
if y > 150:
y -= 10
if t > 0:
y -= t
t -= 2
else:
jumpstate = 'down'
if jumpstate == 'down':
if y < 400:
y += 10
if t <= 30:
y += t
t += 2
else:
jumpstate = 'running'
screen.blit(bg,(0,0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment