Commit 7ca89473 by BellCodeEditor

save project

parent 3770e6f5
Showing with 4 additions and 4 deletions
......@@ -28,23 +28,23 @@ while True:
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
# 按下空格键
if event.type == locals.KEYDOWN:
if event.key == locals.K_SPACE:
jumpstate = "up"
# 跳起->落下
if jumpstate == "up":
if y >150:
y -= 5
else:
jumpstate = "down"
# 落下->跑步
if jumpstate == "down":
if y < 400:
y += 5
else:
jumpstate = "running"
# 切换图片
index += 1
if index == len(list):
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