diff options
Diffstat (limited to 'src/sliceitoff/player/player.py')
-rw-r--r-- | src/sliceitoff/player/player.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sliceitoff/player/player.py b/src/sliceitoff/player/player.py index 0103a81..72c5b2f 100644 --- a/src/sliceitoff/player/player.py +++ b/src/sliceitoff/player/player.py @@ -13,8 +13,9 @@ class PlayerSprite(pygame.sprite.Sprite): super().__init__() self.image = image self.rect = self.image.get_rect() - - def update(self, pos = None, **kwargs): + + def update(self, pos = None): + """ Sets sprite center at given position """ if pos: w, h = self.image.get_size() self.rect = self.image.get_rect().move(pos[0]-w//2,pos[1]-h//2) @@ -49,8 +50,8 @@ class Player(pygame.sprite.Group): self.direction = not self.direction if pos: self.position = Scaling.scale_to_internal(pos) - for sprite in super().sprites(): - sprite.update(pos = pos) + for sprite in super().sprites(): + sprite.update(pos = pos) def sprites(self): """ Only list sprite of current direction for draw """ |