Commit 4a53b035 by BellCodeEditor

save project

parent 69faa861
Showing with 5 additions and 5 deletions
...@@ -43,7 +43,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -43,7 +43,7 @@ hero = [pygame.image.load('hero1.png'),
index = 0 index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
t = 30 t = 40
road_x = 0 road_x = 0
bg_x = 0 bg_x = 0
time = 0 time = 0
...@@ -64,8 +64,8 @@ while True: ...@@ -64,8 +64,8 @@ while True:
# 悟空造型 # 悟空造型
wukong = Player(hero[index]) wukong = Player(hero[index])
if jumpState == "runing": # 跑步状态下 if jumpState == "runing": # 跑步状态下
index += 1 index += 2
if index >= 5: if index >= 2:
index = 0 index = 0
if gamestate == True: if gamestate == True:
...@@ -77,13 +77,13 @@ while True: ...@@ -77,13 +77,13 @@ while True:
else: else:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 降落状态 if jumpState == "down": # 降落状态
if t <= 30: if t <= 40:
y += t y += t
wukong.rect.y = y wukong.rect.y = y
t += 2 t += 2
else: else:
jumpState = "runing" jumpState = "runing"
t =30 t =40
# 将背景图画上去 # 将背景图画上去
bg_x -= 1 bg_x -= 1
......
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