Commit b9557567 by BellCodeEditor

save project

parent 57825079
Showing with 12 additions and 6 deletions
...@@ -27,12 +27,11 @@ while True: ...@@ -27,12 +27,11 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if jumpState=="runing": if jumpState=="runing":
if event.type==locals.KEYDOWN: if event.type==locals.KEYDOWN:
if event.key==locals.K_SPACE: if event.key==locals.K_SPACE:
jumpState="up" jumpState="up"
else:
if jumpState=="up": if jumpState=="up":
if t>=0: if t>=0:
y-=t y-=t
...@@ -45,6 +44,13 @@ while True: ...@@ -45,6 +44,13 @@ while True:
t+=2 t+=2
else: else:
jumpState="runing" jumpState="runing"
if jumpState=="runing":
y=400
if jumpState=="runing":
if not y==400:
y=400
wukong=hero[index] wukong=hero[index]
if jumpState=="runing": if jumpState=="runing":
......
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