Deactivate bonus slow
This commit is contained in:
@@ -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
|
||||
self.gameState.currentPlayer.addPoints(bonus)
|
||||
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