diff options
Diffstat (limited to 'src/sliceitoff/game/show.py')
-rw-r--r-- | src/sliceitoff/game/show.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sliceitoff/game/show.py b/src/sliceitoff/game/show.py index 018e555..b9b684b 100644 --- a/src/sliceitoff/game/show.py +++ b/src/sliceitoff/game/show.py @@ -1,4 +1,4 @@ -""" Reads user input and does actions when game play is on. """ +""" Sprite group that show sprites and skips if key is pressed """ import pygame from .anykey import anykey @@ -13,6 +13,7 @@ class Show(pygame.sprite.Group): self.timeout = 15_000 def update(self, dt = 0, **kwargs): + """ First timeout then fadeout and then inactivity """ super().update(dt = dt, explode = self.explode, **kwargs) if self.fadeout <= 0: self.active = False @@ -27,4 +28,5 @@ class Show(pygame.sprite.Group): self.timeout -= dt def sprites(self): - return super().sprites() if self.active else None
\ No newline at end of file + """ Return sprites only when active """ + return super().sprites() if self.active else []
\ No newline at end of file |