Commit a138524e by BellCodeEditor

save project

parent ab2c54dc
Showing with 7 additions and 5 deletions
......@@ -139,7 +139,7 @@ while True:
record["第3名"] = two
else:
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:
f.write(record)
else:
......@@ -148,15 +148,15 @@ while True:
sprite.score = 0
if score > old_score:
score_audio.play()
old_score = score
old_score = score
scoreSurf = basic_font.render("分数:"+str(score),True,(255,255,255))
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))
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))
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))
# 刷新画面
......
{"第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