Commit e2a94ff5 by BellCodeEditor

auto save

parent 2742489a
Showing with 3 additions and 18 deletions
......@@ -30,7 +30,7 @@ shan_x=0
index = 0
y = 400
jumpState = "runing"
t = 30
aa=Block(bush,cacti,stone)
while True:
......@@ -38,24 +38,9 @@ while True:
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
if event.type == locals.KEYDOWN:
if jumpState == "runing":
if event.key == locals.K_SPACE:
jumpState = "up"
if jumpState == "up": # 起跳状态
if t > 0:
y -= t
t -= 2
else:
jumpState = "down"
if jumpState == "down": # 降落状态
if t <= 30:
y += t
t += 2
else:
jumpState = "runing"
t =30
# 悟空造型
wukong = hero[index]
......
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