Commit c878cf10 by BellCodeEditor

save project

parent da3d6d1d
Showing with 3 additions and 3 deletions
...@@ -74,14 +74,14 @@ while True: ...@@ -74,14 +74,14 @@ while True:
if t > 0: if t > 0:
y -= t y -= t
wukong.rect.y = y wukong.rect.y = y
t -= 1 t -= 5/3
else: else:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 降落状态 if jumpState == "down": # 降落状态
if t <= 30: if t <= 30:
y += t y += t
wukong.rect.y = y wukong.rect.y = y
t += 1 t += 5/3
else: else:
jumpState = "runing" jumpState = "runing"
t =30 t =30
...@@ -116,7 +116,7 @@ while True: ...@@ -116,7 +116,7 @@ while True:
gameover = pygame.image.load('gameover.png') # 游戏结束 gameover = pygame.image.load('gameover.png') # 游戏结束
screen.blit(gameover, (400, 200)) screen.blit(gameover, (400, 200))
gamestate = False gamestate = False
scoreSurf = basic_font.render("分数:"+str(score),True,(255,0,0)) scoreSurf = basic_font.render('score:'+str(score),True,(255,0,0))
screen.blit(scoreSurf,(850,20)) screen.blit(scoreSurf,(850,20))
# 刷新画面 # 刷新画面
......
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