From f502b21183d307fcab9b353aa18609d15c3547f1 Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Thu, 28 Mar 2024 13:54:00 +0200 Subject: hiscores: loading, saving, screen --- src/sliceitoff/game/show.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/sliceitoff/game/show.py') diff --git a/src/sliceitoff/game/show.py b/src/sliceitoff/game/show.py index 50ed0ba..07146c3 100644 --- a/src/sliceitoff/game/show.py +++ b/src/sliceitoff/game/show.py @@ -2,10 +2,11 @@ import pygame from .anykey import anykey -class Show: +class Show(pygame.sprite.Group): """ To show some sprites and quit on any key """ def __init__(self, sprites = []): - self.sprites = sprites + super().__init__() + self.add(sprites) self.fadeout = 1_000 self.timeout = 5_000 @@ -17,7 +18,7 @@ class Show: if anykey(): return False self.fadeout -= dt - self.sprites.update(explode=dt) + self.update(explode=dt) return True if anykey(): -- cgit v1.2.3