summaryrefslogtreecommitdiff
path: root/src/sliceitoff/game/gameplay.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-04-20 22:09:23 +0300
committerViljami Ilola <+@hix.fi>2024-04-20 22:09:23 +0300
commitf4a064c1f36c7ab7993b30832dea386e4b79b49d (patch)
treea5ae7ff69f4959f09f47cb9fddc0dddb6c5c0f8e /src/sliceitoff/game/gameplay.py
parentb9b64aa313a45ab53f856242b4ce5ddb151533fb (diff)
sample loading and laser sound
Diffstat (limited to 'src/sliceitoff/game/gameplay.py')
-rw-r--r--src/sliceitoff/game/gameplay.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sliceitoff/game/gameplay.py b/src/sliceitoff/game/gameplay.py
index 49ff026..c756183 100644
--- a/src/sliceitoff/game/gameplay.py
+++ b/src/sliceitoff/game/gameplay.py
@@ -1,5 +1,6 @@
""" Reads user input and does actions when game play is on. """
import pygame
+from sliceitoff.sfx import sfx
class Gameplay:
""" Logic of the playfield """
@@ -25,6 +26,7 @@ class Gameplay:
if not zap_sprite:
return False
self.stats.add_score(-500)
+ sfx.play("laser")
if pygame.sprite.spritecollideany(zap_sprite, self.enemies):
self.life.lose_life()
if self.stats.lose_life():