Answer the question
In order to leave comments, you need to log in
How to inject scaled_image into the class itself to avoid the need for a variable?
How to inject scaled_image into the class itself to avoid the need for a variable?
class none(pygame.sprite.Sprite):
def __init__(self):
pygame.sprite.Sprite.__init__(self)
self.image = pygame.image.load(os.path.join(IMG,"ser.png")).convert()
self.image.set_colorkey(BLACK_CELL) # made bg transparent
self.rect = self.image.get_rect()
scaled_pawn = pygame.transform.scale(none().image, (70, 70))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question