From f4a064c1f36c7ab7993b30832dea386e4b79b49d Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Sat, 20 Apr 2024 22:09:23 +0300 Subject: sample loading and laser sound --- src/sliceitoff/game/gameplay.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sliceitoff/game') 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(): -- cgit v1.2.3