diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-28 23:34:19 +0200 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-28 23:34:19 +0200 |
commit | 27c7e16e4bd808ce1176f18b7a78c02ff4fa88ee (patch) | |
tree | a585d5ef853a0f8ffd5000cbdc9b0c4257163e53 /src/sliceitoff/game/show.py | |
parent | f894c2fd09ed17540c49cb4083573861ded76554 (diff) |
fonts under text, more sprite.Groups
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 |