Commit f9954b57 by BellCodeEditor

save project

parent fec051cf
Showing with 6 additions and 5 deletions
...@@ -21,7 +21,7 @@ fps = pygame.time.Clock() ...@@ -21,7 +21,7 @@ fps = pygame.time.Clock()
index = 0 index = 0
jumpstate = 'running' jumpstate = 'running'
y = 400 y = 400
t = 30 t = 25
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -39,16 +39,17 @@ while True: ...@@ -39,16 +39,17 @@ while True:
if jumpstate == 'up': if jumpstate == 'up':
if t > 0: if t > 0:
y -= t y -= t
t -= 2 t -= 1.75
else: else:
jumpstate = 'down' jumpstate = 'down'
if jumpstate == 'down': if jumpstate == 'down':
if t <= 30: if t <= 25:
y += t y += t
t += 2 t += 1.75
else: else:
jumpstate = 'running' jumpstate = 'running'
t = 30 t = 25
y = 400
screen.blit(bg,(0,0)) screen.blit(bg,(0,0))
screen.blit(wukong,(150,y)) screen.blit(wukong,(150,y))
screen.blit(road,(0,500)) screen.blit(road,(0,500))
......
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