diff options
Diffstat (limited to 'src/sliceitoff/player/player.py')
-rw-r--r-- | src/sliceitoff/player/player.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/sliceitoff/player/player.py b/src/sliceitoff/player/player.py index f383077..9870c50 100644 --- a/src/sliceitoff/player/player.py +++ b/src/sliceitoff/player/player.py @@ -17,7 +17,7 @@ class Player(): def __init__(self, field = None, enemies = None): self.field = field self.enemies = enemies - self.position = (20_000, 14_000) + self.position = (200_000, 140_000) self.direction = False self.lazer = False self.sprites = pygame.sprite.Group() @@ -39,15 +39,15 @@ class Player(): self.position = Scaling.scale_to_internal(pos) self.updated = True - def get_sprites(self): + def update(self, dt): + """ Update sprites basis of dt. dt = milliseconds from last update """ if self.updated: self.__update_sprites() - return self.sprites def fire_lazer(self): # self.lazer = True # self.updated = True - hitbox = self.field.slice(self.position, self.direction, 450) + hitbox = self.field.slice(self.position, self.direction, 4_500) if hitbox is not None: for enemy in self.enemies.sprites: if hitbox.colliderect(enemy.rect): @@ -64,7 +64,3 @@ class Player(): if not self.lazer: self.direction = not self.direction self.updated = True - - def __del__(self): - pass -
\ No newline at end of file |