summaryrefslogtreecommitdiff
path: root/src/sliceitoff/game/explodeout.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-04-27 16:26:22 +0300
committerViljami Ilola <+@hix.fi>2024-04-27 16:26:22 +0300
commit9f8247dc4da89219b6eede08d58d96964391a077 (patch)
treea6f7dc46275a3988fc528072f5e70caba461fae0 /src/sliceitoff/game/explodeout.py
parentd64c6b122eacd7b33bbda3a62093b492c786b1f9 (diff)
refactor menus and screen showing under menu subpkg
Diffstat (limited to 'src/sliceitoff/game/explodeout.py')
-rw-r--r--src/sliceitoff/game/explodeout.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/sliceitoff/game/explodeout.py b/src/sliceitoff/game/explodeout.py
deleted file mode 100644
index 0349b09..0000000
--- a/src/sliceitoff/game/explodeout.py
+++ /dev/null
@@ -1,38 +0,0 @@
-""" game.explodeout - For showing explogind effect and waiting for a key """
-import pygame
-
-from sliceitoff.sfx import sfx
-from .anykey import anykey
-
-class ExplodeOutGroup(pygame.sprite.Group):
- """ Sprite group that just counts down feadeout/explosion or a key """
- def __init__(self, active = True):
- super().__init__()
- self.explode = False
- self.active = active
- self.fadeout = 1_000
-
- def update(self, dt = 0, **kwargs):
- """ Just does the explosion and marks group inactive """
- if not self.active:
- return False
-
- super().update(dt = dt, explode = self.explode, **kwargs)
-
- if self.explode:
- if self.fadeout <= 0:
- self.active = False
- else:
- if anykey():
- self.fadeout = 0
- self.active = False
- self.fadeout -= dt
- return True
- return True
-
- def do_fadeout(self):
- """ Just kicks off exploding phase """
- if self.explode:
- return
- sfx.play("glass")
- self.explode = True