#循环僵尸,查看僵尸是否碰上炮弹 for bullet in Bullet.bullet_list: #发生碰撞 if self.image_rect.colliderect(bullet.image_rect): Zombie.zombie_list.remove(self) Bullet.bullet_list.remove(bullet)
#查看僵尸是否碰上豌豆 if self.image_rect.colliderect(peas.image_rect): pygame.quit(); exit()