diff options
Diffstat (limited to 'src/sliceitoff/player/player.py')
-rw-r--r-- | src/sliceitoff/player/player.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sliceitoff/player/player.py b/src/sliceitoff/player/player.py index 241897d..2f4ce57 100644 --- a/src/sliceitoff/player/player.py +++ b/src/sliceitoff/player/player.py @@ -4,6 +4,8 @@ import pygame from display import Scaling from images import Images +DEBUG = os.getenv("DEBUG") + class PlayerSprite(pygame.sprite.Sprite): def __init__(self, image, pos): super().__init__() @@ -45,6 +47,8 @@ class Player(): self.__update_sprites() def fire_lazer(self): + if DEBUG: + print("PLAYER: fire lazer") # self.lazer = True # self.updated = True hitbox = self.field.slice(self.position, self.direction, 4_500) @@ -53,7 +57,7 @@ class Player(): for enemy in self.enemies.sprites: if hitbox.colliderect(enemy.rect): hit = True - break; + break for field in self.field.sprites: for enemy in self.enemies.sprites: if enemy.rect.colliderect(field.rect): |