Compare commits
2 Commits
90388fc661
...
655edc25ee
| Author | SHA1 | Date | |
|---|---|---|---|
| 655edc25ee | |||
| 5be3d93e52 |
3
game.py
3
game.py
@ -37,7 +37,7 @@ class Game(gameUtils.Game):
|
|||||||
self.gunShot = pygame.mixer.Sound("./assets/gun-shot.mp3")
|
self.gunShot = pygame.mixer.Sound("./assets/gun-shot.mp3")
|
||||||
self.gunSpin = pygame.mixer.Sound("./assets/gun-spin.mp3")
|
self.gunSpin = pygame.mixer.Sound("./assets/gun-spin.mp3")
|
||||||
self.gunLoad = pygame.mixer.Sound("./assets/gun-load.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.gun = pygame.load_animation('./assets/gun-spin.webp')
|
||||||
self.gunFlash = pygame.image.load("./assets/muzzleflash.png")
|
self.gunFlash = pygame.image.load("./assets/muzzleflash.png")
|
||||||
@ -90,6 +90,7 @@ class Game(gameUtils.Game):
|
|||||||
elif event.type == gameUtils.AnimFinish:
|
elif event.type == gameUtils.AnimFinish:
|
||||||
if event.objectID == self.gun.objectID and event.animationID == 'spin':
|
if event.objectID == self.gun.objectID and event.animationID == 'spin':
|
||||||
self.timeout("FireDelay",randint(0,2000)/1000)
|
self.timeout("FireDelay",randint(0,2000)/1000)
|
||||||
|
self.playSound(self.gunCyclinderStop)
|
||||||
|
|
||||||
elif event.type == gameUtils.Timeout:
|
elif event.type == gameUtils.Timeout:
|
||||||
self.shockScale += self.fire() #check if the user gets shot
|
self.shockScale += self.fire() #check if the user gets shot
|
||||||
|
|||||||
Reference in New Issue
Block a user