Deactivate credit while play
This commit is contained in:
@@ -19,6 +19,7 @@ class GameState:
|
||||
|
||||
def nextPlayer(self):
|
||||
self.currentPlayer = next(self.players)
|
||||
self.isPlaying = True
|
||||
|
||||
@property
|
||||
def currentPlayer(self):
|
||||
|
||||
@@ -25,6 +25,6 @@ RED_SPECIAL_TIMES = 1
|
||||
ORANGE_SPECIAL = SpecialEvent.points
|
||||
ORANGE_SPECIAL_BANK = ORANGE_SPECIAL_BANK_OPTIONS["BOTH"]
|
||||
## Tech config
|
||||
WAIT_TIME_TO_RESET_SECONDS = 0.6
|
||||
WAIT_TIME_TO_RESET_SECONDS = 0.2
|
||||
MAX_NETWORK_RETRIES = 10
|
||||
NETWORK_SLEEP_TIME_SECONDS = 0.05
|
||||
|
||||
@@ -20,6 +20,7 @@ class EndBallEvent(Event):
|
||||
StartBallEvent().trigger(None)
|
||||
return
|
||||
|
||||
self.gameState.isPlaying = False
|
||||
self.gameState.currentPlayer.removeBall()
|
||||
|
||||
self.scorePoints()
|
||||
|
||||
@@ -11,6 +11,9 @@ class StartGameEvent(Event):
|
||||
super().__init__("Start Game Event")
|
||||
|
||||
def trigger(self, target):
|
||||
if self.gameState.isPlaying:
|
||||
return
|
||||
|
||||
super().trigger(target)
|
||||
self.flipper.activate()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user