Deactivate bonus slow
This commit is contained in:
@@ -29,3 +29,4 @@ WAIT_TIME_TO_RESET_SECONDS = 0.15
|
||||
MAX_NETWORK_RETRIES = 10
|
||||
NETWORK_SLEEP_TIME_SECONDS = 0.1
|
||||
BANK_SLEEP_TIME = 0.1
|
||||
BONUS_SLEEP_TIME = 0.1
|
||||
|
||||
@@ -6,6 +6,11 @@ from events.StartBallEvent import StartBallEvent
|
||||
from solenoids.MainFlipper import MainFlipper
|
||||
from solenoids.TopFlipper import TopFlipper
|
||||
|
||||
from time import sleep
|
||||
from config import BONUS_SLEEP_TIME
|
||||
|
||||
from lamps.LampGroup import BONUS_LAMPS
|
||||
|
||||
class EndBallEvent(Event):
|
||||
def __init__(self, gameState):
|
||||
self.gameState = gameState
|
||||
@@ -30,5 +35,9 @@ class EndBallEvent(Event):
|
||||
EndGameEvent().trigger(None)
|
||||
|
||||
def scorePoints(self):
|
||||
bonus = self.gameState.currentPlayer.bonus * self.gameState.currentPlayer.bonusMultiplier * 1000
|
||||
currentPlayer = self.gameState.currentPlayer
|
||||
for i in range(currentPlayer.bonus):
|
||||
bonus = self.gameState.currentPlayer.bonusMultiplier * 1000
|
||||
self.gameState.currentPlayer.addPoints(bonus)
|
||||
BONUS_LAMPS.deactivateCurrent()
|
||||
sleep(BONUS_SLEEP_TIME)
|
||||
Reference in New Issue
Block a user