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