Commit 8fa927a1 by BellCodeEditor

save project

parent 36fba0b4
Showing with 4 additions and 0 deletions
...@@ -23,6 +23,7 @@ while True: ...@@ -23,6 +23,7 @@ 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 jumpstart == "run":
jumpstart="up" jumpstart="up"
if jumpstart == "up": if jumpstart == "up":
if y>150: if y>150:
...@@ -35,7 +36,10 @@ while True: ...@@ -35,7 +36,10 @@ while True:
else: else:
jumpstart="run" jumpstart="run"
wukong=pygame.image.load(hero[index]) wukong=pygame.image.load(hero[index])
if jumpstart == "run":
index+=1 index+=1
else:
index=0
if index>4: if index>4:
index=0 index=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