Commit dc0c9f88 by BellCodeEditor

save project

parent b6a08458
Showing with 7 additions and 1 deletions
......@@ -58,7 +58,7 @@ old_score = 0
speedx = 8
audio_player = pygame.mixer.Sound("score.wav")
with open("record.txt", "r", encoding="utf-8") as f3
with open("record.txt", "r", encoding="utf-8") as f3:
content = f3.read()
record = json.loads(content)
one = record["第1名"]
......@@ -138,6 +138,12 @@ while True:
old_score = score
scoreSurf = basic_font.render("分数:"+str(score),True,(255,0,0))
screen.blit(scoreSurf,(850,20))
scoreSurf2 = basic_font.render("第1名:"+str(one),True,(255,0,0))
screen.blit(scoreSurf2,(850,50))
scoreSurf3 = basic_font.render("第2名:"+str(two),True,(255,0,0))
screen.blit(scoreSurf3,(850,80))
scoreSurf4 = basic_font.render("第3名:"+str(three),True,(255,0,0))
screen.blit(scoreSurf4,(850,110))
# 刷新画面
pygame.display.update()
......
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