active
This commit is contained in:
@@ -47,6 +47,7 @@ class PlayerState:
|
|||||||
ballsLeft = 0
|
ballsLeft = 0
|
||||||
replayBall = False
|
replayBall = False
|
||||||
hasBallScored = False
|
hasBallScored = False
|
||||||
|
isActive = False
|
||||||
|
|
||||||
redSpecial = 0
|
redSpecial = 0
|
||||||
redSpecialLit = False
|
redSpecialLit = False
|
||||||
@@ -79,8 +80,12 @@ class PlayerState:
|
|||||||
self.specialDisplay.printScore()
|
self.specialDisplay.printScore()
|
||||||
|
|
||||||
def activate(self):
|
def activate(self):
|
||||||
|
self.isActive = True
|
||||||
self.reset()
|
self.reset()
|
||||||
|
|
||||||
|
def deactivate(self):
|
||||||
|
self.isActive = False
|
||||||
|
|
||||||
def enableTiming(self):
|
def enableTiming(self):
|
||||||
if config.BONUS_TIME_ALGORITHM == config.BONUS_TIME_ALGORITHM_OPTIONS.RANDOM:
|
if config.BONUS_TIME_ALGORITHM == config.BONUS_TIME_ALGORITHM_OPTIONS.RANDOM:
|
||||||
self.disableAdvanceTimeLeft()
|
self.disableAdvanceTimeLeft()
|
||||||
@@ -247,6 +252,9 @@ class PlayerState:
|
|||||||
self.replayBall = True
|
self.replayBall = True
|
||||||
|
|
||||||
def addPoints(self, points):
|
def addPoints(self, points):
|
||||||
|
if not self.isActive:
|
||||||
|
return
|
||||||
|
|
||||||
if not self.hasBallScored:
|
if not self.hasBallScored:
|
||||||
self.hasBallScored = True
|
self.hasBallScored = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user