diff options
Diffstat (limited to 'src/sliceitoff/player/player.py')
-rw-r--r-- | src/sliceitoff/player/player.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sliceitoff/player/player.py b/src/sliceitoff/player/player.py index 9870c50..241897d 100644 --- a/src/sliceitoff/player/player.py +++ b/src/sliceitoff/player/player.py @@ -48,17 +48,19 @@ class Player(): # self.lazer = True # self.updated = True hitbox = self.field.slice(self.position, self.direction, 4_500) + hit = False if hitbox is not None: for enemy in self.enemies.sprites: if hitbox.colliderect(enemy.rect): - return True + 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) - return False + return hit def set_direction(self): if not self.lazer: |