У меня есть игра написанная на pygame. При попытке перехода в меню настроек, ничего не происходит.
configs = pygame.sprite.Group()
starts = pygame.sprite.Group()
fon_start = Background(imbackground_start,starts)
start_button = Buttons(imstart,starts,SCREEN[0]//2, SCREEN[1]//2)
config_button = Buttons(imconfig,starts,575,475)
while start:
starts.draw(sc)
for event in pygame.event.get():
if event.type == pygame.QUIT:
start = False
if event.type == pygame.MOUSEBUTTONDOWN:
if config_button.pressed(pygame.mouse.get_pos()) == True :
fon_start.kill()
start_button.kill()
config_button.kill()
fon = Background(imbackground_2,configs)
back_button = Buttons(imback,configs,50,450)
pygame.display.update()
print('1')
if back_button.pressed(pygame.mouse.get_pos()) == True:
fon.kill()
back_button.kill()
fon_start = Background(imbackground_start,starts)
start_button = Buttons(imstart,starts,SCREEN[0]//2, SCREEN[1]//2)
config_button = Buttons(imconfig,starts,575,475)
print("1") #проверил, 1 - выводится, на то, что надо удалить - не удаляется.
if start_button.pressed(pygame.mouse.get_pos()) == True :
start_button.kill()
choise = True
start = False