diff options
Diffstat (limited to 'src/sliceitoff/player/player.py')
-rw-r--r-- | src/sliceitoff/player/player.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/sliceitoff/player/player.py b/src/sliceitoff/player/player.py index 2f4ce57..6e2ab0b 100644 --- a/src/sliceitoff/player/player.py +++ b/src/sliceitoff/player/player.py @@ -58,12 +58,7 @@ class Player(): if hitbox.colliderect(enemy.rect): hit = True break - for field in self.field.sprites: - for enemy in self.enemies.sprites: - if enemy.rect.colliderect(field.rect): - break - else: - field.remove(self.field.sprites) + self.field.kill_if_not_colliding(self.enemies.sprites) return hit def set_direction(self): |