Changed nextPlayer() call to happen after new animations

This commit is contained in:
2025-06-25 12:29:46 +01:00
parent 4dc7d0dda5
commit 72f1891c87

View File

@ -127,11 +127,12 @@ class Game(gameUtils.Game):
if event.objectID == self.gun.objectID and event.animationID == 'spin': if event.objectID == self.gun.objectID and event.animationID == 'spin':
self.timeout("FireDelay",random.randint(750,2000)/1000) self.timeout("FireDelay",random.randint(750,2000)/1000)
self.playSound(self.gunCyclinderStop) self.playSound(self.gunCyclinderStop)
elif event.objectID == self.gun.objectID and event.animationID in ['blank', 'fire']:
self.nextPlayer()
elif event.type == gameUtils.Timeout and event.timeoutID == 'FireDelay': elif event.type == gameUtils.Timeout and event.timeoutID == 'FireDelay':
self.shockScale += self.fire() #check if the user gets shot self.shockScale += self.fire() #check if the user gets shot
self.shockScale = min(self.shockScale, 1) #keeps shockScale in bounds self.shockScale = min(self.shockScale, 1) #keeps shockScale in bounds
self.nextPlayer()
def update(self): def update(self):
""" """