Программа не воспроизводится
Пишу игру, параллельно практикуя ООП, после вызова функции menus_play(), программа не воспроизводиться дальше, код:
class Batton:
def __init__(self, x, y, xx, yy, xxx, yyy, image, image_fon):
self.x = x
self.y = y
self.xx = xx
self.yy = yy
self.xxx = xxx
self.yyy = yyy
self.image = image
self.image_fon = image_fon
def battons(self):
for ev in pygame.event.get():
mouses = pygame.mouse.get_pos()
if ev.type == pygame.MOUSEMOTION:
if self.x <= mouses[0] <= self.xx and self.y <= mouses[1] <= self.yy:
self.x -= 2
self.y -= 2
return screen.blit(self.image, (self.x, self.y))
else:
return screen.blit(self.image_fon, (self.xxx, self.yyy))
def menus_play():
batton_menu_play = Batton(308, 435, 488, 482, 279, 334, menus_plays, menu)
batton_menu_play.battons()
screen.fill(bd_color)
screen.blit(menu, (279, 334))
while True:
menus_play()
for ev in pygame.event.get():
if ev.type == pygame.MOUSEBUTTONDOWN:
if x <= mousess[0] <= xx and y <= mousess[1] <= yy:
print("dd")
pygame.display.flip()