Commit 25400f4f by BellCodeEditor

save project

parent fceff5b4
Showing with 13 additions and 1 deletions
...@@ -121,6 +121,18 @@ while True: ...@@ -121,6 +121,18 @@ 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
if score > one:
record["第1名"] = score
record["第2名"] = one
record["第3名"] = tow
elif score > tow:
record["第2名"] = score
record["第3名"] = tow
else:
record["第3名"] = score
else: else:
if (sprite.rect.x + sprite.rect.width) < wukong.rect.x: if (sprite.rect.x + sprite.rect.width) < wukong.rect.x:
score += sprite.score score += sprite.score
...@@ -135,4 +147,4 @@ while True: ...@@ -135,4 +147,4 @@ while True:
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(60) FPS.tick(30)
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