Commit 3dfdadcb by BellCodeEditor

save project

parent d6c12796
Showing with 10 additions and 5 deletions
......@@ -52,27 +52,32 @@ while True:
if jumpState == "runing":
if event.key == locals.K_SPACE:
jumpState = "up"
wukong =Player(hero[index])
if jumpState == "runing": # 跑步状态下
index += 1
if index >= 5:
index = 0
if gamestate==True:
if jumpState == "up": # 起跳状态
if t > 0:
y -= t
wukong.rect.y=y
t -= 2
else:
jumpState = "down"
if jumpState == "down": # 降落状态
if t <= 30:
y += t
wukong.rect.y=y
t += 2
else:
jumpState = "runing"
t =30
# 悟空造型
wukong =Player(hero[index])
if jumpState == "runing": # 跑步状态下
index += 1
if index >= 5:
index = 0
# 将背景图画上去
screen.blit(background, (ba_x, 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