From 5be3d93e52a090afdc853dddc690d84adea431f3 Mon Sep 17 00:00:00 2001 From: Tango Date: Sun, 22 Jun 2025 18:37:27 +0100 Subject: [PATCH] Added gun cyclinder stop sfx --- game.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game.py b/game.py index 215bc9e..6c047d7 100644 --- a/game.py +++ b/game.py @@ -33,7 +33,7 @@ class Game(gameUtils.Game): self.gunShot = pygame.mixer.Sound("./assets/gun-shot.mp3") self.gunSpin = pygame.mixer.Sound("./assets/gun-spin.mp3") self.gunLoad = pygame.mixer.Sound("./assets/gun-load.mp3") - self.gunCyclinder = pygame.mixer.Sound("./assets/gun-cylinder-stop.mp3") + self.gunCyclinderStop = pygame.mixer.Sound("./assets/gun-cylinder-stop.mp3") #self.gun = pygame.load_animation('./assets/gun-spin.webp') self.gunFlash = pygame.image.load("./assets/muzzleflash.png") @@ -86,6 +86,7 @@ class Game(gameUtils.Game): elif event.type == gameUtils.AnimFinish: if event.objectID == self.gun.objectID and event.animationID == 'spin': self.timeout("FireDelay",randint(0,2000)/1000) + self.playSound(self.gunCyclinderStop) elif event.type == gameUtils.Timeout: self.shockScale += self.fire() #check if the user gets shot