this is my first attempt on trying to make my highscore blit on my end_screen but my problem is that it doesnt show the saved score it only shows that I have 0 points I am not sure how to fix this
what I have done is blitting the score text on my end_screen as well it just seems to show my score is 0 everytime
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()