Commit aa8b99e9 by BellCodeEditor

save project

parent f5f4ab9e
Showing with 5 additions and 3 deletions
...@@ -46,6 +46,7 @@ while True: ...@@ -46,6 +46,7 @@ while True:
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
jumpState = "up" jumpState = "up"
if gamestate == True:
if jumpState == "up": # 起跳状态 if jumpState == "up": # 起跳状态
if t > 0: if t > 0:
y -= t y -= t
...@@ -54,14 +55,15 @@ while True: ...@@ -54,14 +55,15 @@ while True:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 降落状态 if jumpState == "down": # 降落状态
if t <= 30: if t <= 30:
y += t y -= t
t += 2 wukong.rect.y = y
t -= 2
else: else:
jumpState = "runing" jumpState = "runing"
t =30 t =30
# 悟空造型 # 悟空造型
wukong = hero[index] wukong = Player(hero[index])
if jumpState == "runing": # 跑步状态下 if jumpState == "runing": # 跑步状态下
index += 1 index += 1
if index >= 5: if index >= 5:
......
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