From ef7acb7246d9ef1050d8280046ded1d3a96756a1 Mon Sep 17 00:00:00 2001 From: Jonas Zeunert Date: Sat, 3 Sep 2022 19:43:28 +0200 Subject: [PATCH] bub --- PlayerState.py | 2 +- events/StartBallEvent.py | 5 ++++- sounds/LowScore.py | 2 +- targets/bottom_lanes/LeftInlaneTarget.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PlayerState.py b/PlayerState.py index 5a4c3c3..e320cf8 100644 --- a/PlayerState.py +++ b/PlayerState.py @@ -325,7 +325,7 @@ class PlayerState: self.bonusTime -= 1 self.printSpecial() - if self.bonus_time == 5: + if self.bonusTime == 5: Sound(28).play() if self.bonusTime == 0: diff --git a/events/StartBallEvent.py b/events/StartBallEvent.py index 2bf6c2c..d981987 100644 --- a/events/StartBallEvent.py +++ b/events/StartBallEvent.py @@ -1,7 +1,7 @@ from Event import Event from solenoids.OutHoleSolenoid import OutHoleSolenoid from solenoids.MainFlipper import MainFlipper - +from sounds.LowScore import LowScore class StartBallEvent(Event): def __init__(self, gameState = None): @@ -15,6 +15,9 @@ class StartBallEvent(Event): return self.gameState.isPlaying = True + if self.gameState.currentPlayer.ballsLeft == 1: + LowScore().play() + super().trigger(target) self.flipper.activate() diff --git a/sounds/LowScore.py b/sounds/LowScore.py index 0872826..2557bee 100644 --- a/sounds/LowScore.py +++ b/sounds/LowScore.py @@ -1,5 +1,5 @@ from Sound import Sound -class Seconds(Sound): +class LowScore(Sound): def __init__(self): self.name = '''Speech 9: "What a low score!"''' \ No newline at end of file diff --git a/targets/bottom_lanes/LeftInlaneTarget.py b/targets/bottom_lanes/LeftInlaneTarget.py index 3ff538b..5f02aa2 100644 --- a/targets/bottom_lanes/LeftInlaneTarget.py +++ b/targets/bottom_lanes/LeftInlaneTarget.py @@ -1,5 +1,5 @@ from Target import Target - +from Sound import Sound class LeftInlaneTarget(Target): def __init__(self): super().__init__(3000, 'Left Inlane')