I am trying to get the rect of the circle in the draw method but Pygame gives an error everytime I call the get_rect() method on my Alien instance. I want a dynamic circle surface for collision detection because my code generates different random size of circles. Please any help will be greatly appreciated
class Alien():
def __init__(self, etc):
self.x = random.randrange(0,600)
self.y and self.size are also random variables
def draw(self, screen, colour):
pygame.draw.circle(screen, colour, (self.x, self.y), self.size)
I want to get the rect of this circle from the draw method but it doesn't have a rect method. I checked online and i saw you could use pygame.surface but I don't know how to use it to generate a surface for my circle taking into consideration that when I generate 20 different Alien circle object, they w