Commit a138524e by BellCodeEditor

save project

parent ab2c54dc
Showing with 7 additions and 5 deletions
...@@ -139,7 +139,7 @@ while True: ...@@ -139,7 +139,7 @@ while True:
record["第3名"] = two record["第3名"] = two
else: else:
record["第3名"] = score record["第3名"] = score
recond = json.dumps(record,ensure_ascii=False) record = json.dumps(record,ensure_ascii=False)
with open('record.txt','w',encoding='utf-8') as f: with open('record.txt','w',encoding='utf-8') as f:
f.write(record) f.write(record)
else: else:
...@@ -148,15 +148,15 @@ while True: ...@@ -148,15 +148,15 @@ while True:
sprite.score = 0 sprite.score = 0
if score > old_score: if score > old_score:
score_audio.play() score_audio.play()
old_score = score old_score = score
scoreSurf = basic_font.render("分数:"+str(score),True,(255,255,255)) scoreSurf = basic_font.render("分数:"+str(score),True,(255,255,255))
screen.blit(scoreSurf,(850,20)) screen.blit(scoreSurf,(850,20))
scoreSurf = basic_font.render("第1名:"+str(score),True,(255,255,255)) scoreSurf = basic_font.render("第1名:"+str(one),True,(255,255,255))
screen.blit(scoreSurf,(850,50)) screen.blit(scoreSurf,(850,50))
scoreSurf = basic_font.render("第2名:"+str(score),True,(255,255,255)) scoreSurf = basic_font.render("第2名:"+str(two),True,(255,255,255))
screen.blit(scoreSurf,(850,80)) screen.blit(scoreSurf,(850,80))
scoreSurf = basic_font.render("第3名:"+str(score),True,(255,255,255)) scoreSurf = basic_font.render("第3名:"+str(three),True,(255,255,255))
screen.blit(scoreSurf,(850,110)) screen.blit(scoreSurf,(850,110))
# 刷新画面 # 刷新画面
......
{"第1名": 6, "第2名": 0, "第3名": 0}
\ 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