Commit 51e940d3 by BellCodeEditor

save project

parent 0c18276a
Showing with 7 additions and 5 deletions
File added
......@@ -50,15 +50,17 @@ road_x = 0
bg_x = 0
time = 0
gamestate = True
score = 0
old_score = score
block_list =pygame.sprite.Group() # 创建精灵组
with open('record.txt','r',encoding='utf-8')as f:
content = f.read()
recond = json.loads(content)
one = content["第一名"]
two = content["第二名"]
thr = content["第三名"]
record = json.loads(content)
one = record["第1名"]
two = record["第2名"]
thr = record["第3名"]
while True:
for event in pygame.event.get():
......@@ -125,7 +127,7 @@ while True:
gamestate = False
scoreSurf = basic_font.render("分数:"+str(score),True,(255,255,255))
screen.blit(scoreSurf,(880,20))
scoreSurf = basic_font.render("第一名:"+str(one)),True,(255,255,255))
scoreSurf = basic_font.render("第一名:"+str(one),True,(255,255,255))
screen.blit(scoreSurf,(880,50))
scoreSurf = basic_font.render("第二名:"+str(two),True,(255,255,255))
screen.blit(scoreSurf,(880,80))
......
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