Commit c17d7781 by BellCodeEditor

save project

parent 9e74b6df
Showing with 14 additions and 1 deletions
import pygame
from pygame import locals
import random
import json
pygame.init()
......@@ -43,8 +44,13 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero5.png')]
#o=Block(stone,cacti,apple)
with open('record.txt','r',encoding='utf-8') as f:
content=f.read()
content=json.loads(content)
one=content['第1名']
two=content['第2名']
three=content['第3名']
block_list=pygame.sprite.Group()
c
time=0
index = 0
JumpSpeed= 30
......@@ -145,6 +151,13 @@ while True:
scoreWord=word.render(info+str(word2),True,(255,255,255))
screen.blit(scoreWord, (730,10))
score1=word.render('First:'+str(one),True,(255,255,255))
screen.blit(score1, (800,50))
score1=word.render('Second:'+str(two),True,(255,255,255))
screen.blit(score1, (800,90))
score1=word.render('Third:'+str(three),True,(255,255,255))
screen.blit(score1, (800,130))
pygame.display.update()
FPS.tick(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