Commit 0139b430 by BellCodeEditor

auto save

parent eea0563b
Showing with 6 additions and 5 deletions
...@@ -24,8 +24,8 @@ while True: ...@@ -24,8 +24,8 @@ 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:
j="up"
wukong=hero[index] wukong=hero[index]
index+=1# 将背景图画上去 index+=1# 将背景图画上去
if index==5: if index==5:
...@@ -35,9 +35,10 @@ while True: ...@@ -35,9 +35,10 @@ while True:
y-=5 y-=5
screen.blit(wukong, (150, y)) screen.blit(wukong, (150, y))
else: else:
jump="down": j="down":
if y>150: if j=="down":
y-=5 if y<400:
y+=5
screen.blit(wukong, (150, y)) screen.blit(wukong, (150, y))
else: else:
jump="rinning": jump="rinning":
......
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