Я пишу кликер, но у меня не отображается количество денег на дисплэе!
import pygame as pg
pg.init()
RES = WIGHT, HEIGHT = 495, 880
sc = pg.display.set_mode(RES)
FPS = 30
clock = pg.time.Clock()
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 235)
money = 1
click = 1
font = pg.font.SysFont('Calibri', 35)
while True:
for event in pg.event.get():
if event.type == pg.QUIT:
pg.quit()
quit()
elif event.type == pg.MOUSEBUTTONDOWN:
position = pg.mouse.get_pos()
x, y = position
if 97.5 <= x <= 397.5 and 280 <= y <= 580:
money += click
sc.fill(BLACK)
pg.draw.rect(sc, RED, (97.5, 280, 300, 300), 2)
moneytext = font.render('Money: ' + str(money), WHITE, 5)
sc.blit(moneytext, (200, 20))
pg.display.update()
clock.tick(FPS)