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