This commit is contained in:
Jonas Zeunert
2022-08-30 19:14:21 +02:00
parent d980934216
commit 762cb03912
4 changed files with 14 additions and 3 deletions

View File

@@ -4,11 +4,16 @@ from solenoids.MainFlipper import MainFlipper
class StartBallEvent(Event):
def __init__(self):
def __init__(self, gameState = None):
self.gameState = gameState
self.flipper = MainFlipper()
super().__init__("Start Ball Event")
def trigger(self, target):
if self.gameState is not None:
if self.gameState.isPlaying or not self.gameState.isStarted:
return
super().trigger(target)
self.flipper.activate()
OutHoleSolenoid().trigger()