def _check_for_bullet_hits(self):
for bullet in list(self._bullets):
for enemy in list(self._enemies):
- if enemy.collidepoint(bullet.pos):
+ if enemy.collidepoint(bullet.pos) and bullet.level_layer == enemy.level_layer:
self._hit_enemy(enemy, bullet.weapon)
self._bullets.remove(bullet)