Added basic popup code

This commit is contained in:
2025-06-24 14:36:57 +01:00
parent 2e59e718e6
commit 0a2305f4cc

View File

@ -84,14 +84,10 @@ class Game(gameUtils.Game):
self.playSound(self.gunShot) self.playSound(self.gunShot)
self.turnHandler.playing[0].punish(self.shockScale) self.turnHandler.playing[0].punish(self.shockScale)
print(f'{self.turnHandler.playing[0].name} is fucking dead.') print(f'{self.turnHandler.playing[0].name} is fucking dead.')
self.turnHandler.next()
print(f'{self.turnHandler.playing[0].name} is up')
return 0.04 return 0.04
#remember to add shock #remember to add shock
else: else:
self.playSound(self.gunBlank) self.playSound(self.gunBlank)
self.turnHandler.next()
print(f'{self.turnHandler.playing[0].name} is up')
return 0 return 0
def onEvent(self, event): def onEvent(self, event):
@ -122,6 +118,8 @@ class Game(gameUtils.Game):
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.turnHandler.next()
self.popup('Next player', f'Pass shocker to {self.turnHandler.playing[0].name},\nthen press R-CTRL+ENTER to continue.')
def update(self): def update(self):
""" """