Commit cf74a130 by BellCodeEditor

save project

parent 52086e55
Showing with 5 additions and 3 deletions
...@@ -29,16 +29,18 @@ while True: ...@@ -29,16 +29,18 @@ while True:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if key.type == locals.K_SPACE: if event.key == locals.K_SPACE:
jumps="up" jumps="up"
if jumps=="up": if jumps=="up":
if y>150: if y>150:
y-=5 y-=5
jumps="down" else:
jumps="down"
if jumps=="down": if jumps=="down":
if y<400: if y<400:
y+=5 y+=5
jumps="running" else:
jumps="running"
......
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