это моя первая попытка сделать мой рекорд на моем end_screen, но моя проблема в том, что он не показывает сохраненный счет, он показывает только то, что у меня 0 очков, я не уверен, как это исправить
то, что я сделал, - это отображение текста счета на моем end_screen, и мне кажется, что мой счет каждый раз равен 0
font = pygame.font.Font("do.ttf", 50)
text = font.render(" YOUR Fish " + str(apple), True, (255,255,255))
rect = text.get_rect()
window.blit(text,rect)
# end screen
def end_screen():
# this makes it
snow_list=[]
no_of_circles=100;
clock = pygame.time.Clock()
FPS = 60
clock.tick(FPS)
for i in range(no_of_circles):
x = random.randrange(0, 800)
y = random.randrange(0, 700)
snow_list.append([x,y])
# the background image
red = (200,0,0)
green = (255,250,250)
bright_red = (255,250,0)
bright_green = (0,255,0)
clock = pygame.time.Clock()
intro = True
while intro:
clock.tick(FPS)
for event in pygame.event.get():
if event.type == pygame.QUIT:
intro = False
pygame.quit()
# GAME INTRO IMAGE
button("Click To Play!",40,310,220,60,green,bright_green,crash)
bls = pygame.image.load("end.png")
window.blit(bls,(0,0))
font = pygame.font.Font("do.ttf", 50)
text = font.render(" YOUR Fish " + str(apple), True, (255,255,255))
rect = text.get_rect()
window.blit(text,rect)
for point in snow_list:
point[1]+=1
pygame.draw.circle(window, (255,255,255), point, 2)
if(point[1] >= 600):
point[0] = random.randrange(0, 600)
point[1] = random.randrange(-10, -5)
clock.tick(FPS)
pygame.display.update()