Commit 0d187b5e by BellCodeEditor

auto save

parent 064bbb4e
Showing with 4 additions and 6 deletions
......@@ -58,7 +58,7 @@ old_score = score
block_list =pygame.sprite.Group() # 创建精灵组
whith open('score.txt','r',encoding='utf-8') as f:
with open('score.txt','r',encoding='utf-8') as f:
content = f.read()
record = json.loads(content)
a = record["第1名"]
......@@ -140,14 +140,13 @@ while True:
scoreSurF = basic_font.render('分数:'+str(score),True,(255,255,255))
screen.blit(scoreSurF,(880,20))
scoreSurF = basic_font.render('分数:'+str(a),True,(255,255,255))
scoreSurF = basic_font.render('第一名:'+str(a),True,(255,255,255))
screen.blit(scoreSurF,(880,50))
scoreSurF = basic_font.render('分数:'+str(b),True,(255,255,255))
scoreSurF = basic_font.render('第二名:'+str(b),True,(255,255,255))
screen.blit(scoreSurF,(880,80))
scoreSurF = basic_font.render('分数:'+str(c),True,(255,255,255))
scoreSurF = basic_font.render('第三名:'+str(c),True,(255,255,255))
screen.blit(scoreSurF,(880,110))
# 刷新画面
pygame.display.update()
FPS.tick(60)
\ No newline at end of file
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