Commit 092f10db by BellCodeEditor

auto save

parent f1049590
Showing with 8 additions and 8 deletions
...@@ -23,14 +23,14 @@ while True: ...@@ -23,14 +23,14 @@ while True:
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
if y > 150: jump_state = "up"
jump_state = "up" if jump_state == "up":
y -= 5 if y > 150:
elif y < 400: y -= 5
jump_state = "down" elif y < 400:
y += 5 y += 5
else: else:
jump_state = "run" jump_state = "run"
wukong = pygame.image.load(hero[index]) wukong = pygame.image.load(hero[index])
index = (index+1)%5 index = (index+1)%5
......
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