I have sprites running around a simulator.
class guys(pygame.sprite.Sprite):
def __init__(self):
super().__init__()
self.image = pygame.image.load("/Users/taiji/Desktop/Sim/images/guys.png")
self.original_image = self.image
self.surf = pygame.Surface((50, 30))
pos = (random.uniform(0,SCREEN_WIDTH), random.uniform(0,300))
self.rect = self.surf.get_rect(center = pos)
I would like to shrink them in size from (50, 30) to (5, 3). Later on I'll have them grow based on energy so I'll change that (5, 3) to something else, but I'm just trying to get the basics down now. I tried this:
def grow(sprites):
for entity in sprites:
pygame.transform.scale(entity.surf, (5, 3))
But they didn't change at all. Can someone help me with this? Do I need to do anything to entity.rect so that collisions are still ok?
Thank you for the help!