Compare commits

..

2 Commits

View File

@ -37,7 +37,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")
@ -90,6 +90,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