So I am making a zombie shooter game in pygame. I have a player - a zombie list - and a bullets list. all of them are rectangles.
I need to detect the collision between all the bullets and all zombies. - i tried colliderect
but and collidelist
but that is between a object and a list. I want a list and another list.
when i try doing:
def collide(self):
for zombie in self.zombies:
index = self.zombie.collidelist(self.bullets)
if index:
print("hit")
in zombie class it gives error TypeError: Argument must be a sequence of rectstyle objects.