Added timeout ID check
This commit is contained in:
2
game.py
2
game.py
@ -119,7 +119,7 @@ class Game(gameUtils.Game):
|
||||
self.timeout("FireDelay",randint(750,2000)/1000)
|
||||
self.playSound(self.gunCyclinderStop)
|
||||
|
||||
elif event.type == gameUtils.Timeout:
|
||||
elif event.type == gameUtils.Timeout and event.timeoutID == 'FireDelay':
|
||||
self.shockScale += self.fire() #check if the user gets shot
|
||||
self.shockScale = min(self.shockScale, 1) #keeps shockScale in bounds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user