def handleToonSwitchedTeams(self, toonId): DistributedPartyTeamActivity.handleToonSwitchedTeams(self, toonId) toon = base.cr.doId2do.get(toonId, None) if toon is None: return if self.view is not None: self.view.handleToonSwitchedTeams(toon)
def announceGenerate(self): DistributedPartyTeamActivity.announceGenerate(self) for i in range(len(self.toonIds)): for toonId in self.toonIds[i]: toon = base.cr.doId2do.get(toonId, None) if toon: self.view.handleToonJoined(toon, i, lateEntry=True)
def handleToonExited(self, toonId): toon = base.cr.doId2do.get(toonId, None) if toon is None: return if self.view is not None: self.view.handleToonExited(toon) DistributedPartyTeamActivity.handleToonExited(self, toonId)
def handleToonExited(self, toonId): DistributedPartyTeamActivity.handleToonExited(self, toonId) if toonId == base.localAvatar.doId: self.cameraMoveIval.pause() if toonId not in self.fallenToons: if toonId in self.toonIdsToAnimIntervals and self.toonIdsToAnimIntervals[toonId] is not None: self.toonIdsToAnimIntervals[toonId].finish() toon = self.getAvatar(toonId) targetH = fitDestAngle2Src(toon.getH(self.root), 180.0) targetPos = self.hopOffPositions[self.getTeam(toonId)][self.getIndex(toonId, self.getTeam(toonId))] hopOffAnim = Sequence( Func(toon.startPosHprBroadcast, 0.1), toon.hprInterval(0.2, VBase3(targetH, 0.0, 0.0), other=self.root), Func(toon.b_setAnimState, "jump", 1.0), Wait(0.4), PartyUtils.arcPosInterval(0.75, toon, targetPos, 5.0, self.root), Func(toon.stopPosHprBroadcast), Func(toon.sendCurrentPosition), Func(self.hopOffFinished, toonId), ) self.toonIdsToAnimIntervals[toonId] = hopOffAnim self._hopOffFinishedSV.set(False) self.toonIdsToAnimIntervals[toonId].start() else: self._hopOffFinishedSV.set(True) del self.toonIdsToAnimIntervals[toonId] return
def unload(self): DistributedPartyTeamActivity.unload(self) self.arrowKeys.destroy() self.unloadIntervals() self.unloadModels() self.unloadGuiElements() self.unloadSounds() # delete variables if hasattr(self, "toonIds"): del self.toonIds del self.buttons del self.arrowKeys del self.keyTTL del self.idealRate del self.keyRate del self.allOutMode del self.rateMatchAward del self.toonIdsToStartPositions del self.toonIdsToIsPullingFlags del self.toonIdsToRightHands del self.fallenToons del self.fallenPositions del self.unusedFallenPositionsIndices self.toonIdsToAnimIntervals.clear() del self.toonIdsToAnimIntervals
def generate(self): DistributedPartyTeamActivity.generate(self) self._hopOffFinishedSV = StateVar(True) self._rewardFinishedSV = StateVar(True) self._isWalkStateReadyFC = FunctionCall( self._testWalkStateReady, self._hopOffFinishedSV, self._rewardFinishedSV )
def load(self): DistributedPartyTeamActivity.load(self) self.loadModels() self.loadGuiElements() self.loadSounds() self.loadIntervals() self.arrowKeys = ArrowKeys()
def startActive(self): DistributedPartyTeamActivity.startActive(self) self.toonIdsToStartPositions.clear() self.toonIdsToIsPullingFlags.clear() for toonId in self.getToonIdsAsList(): self.toonIdsToIsPullingFlags[toonId] = False toon = self.getAvatar(toonId) if toon: self.toonIdsToStartPositions[toonId] = toon.getPos(self.root) else: self.notify.warning( "couldn't find toon %d assigning 0,0,0 to startPos" % toonId) self.toonIdsToStartPositions[toonId] = Point3(0, 0, 0) self.unusedFallenPositionsIndices = [0, 1, 2, 3] self.setupInterval = Parallel(self.globalSetupInterval) if self.isLocalToonPlaying: self.keyTTL = [] self.idealForce = 0.0 self.keyRate = 0 self.rateMatchAward = 0.0 self.allOutMode = False self.setIdealRate(PartyGlobals.TugOfWarTargetRateList[0][1]) self.setupInterval.append(self.localSetupInterval) self.setupInterval.start()
def __init__(self, cr): DistributedPartyTeamActivity.__init__( self, cr, PartyGlobals.ActivityIds.PartyCog, startDelay=PartyGlobals.CogActivityStartDelay, balanceTeams=PartyGlobals.CogActivityBalanceTeams)
def setToonsPlaying(self, leftTeamToonIds, rightTeamToonIds): DistributedPartyTeamActivity.setToonsPlaying(self, leftTeamToonIds, rightTeamToonIds) self.toonIdsToRightHands.clear() for toonId in self.getToonIdsAsList(): toon = self.getAvatar(toonId) if toon: self.toonIdsToRightHands[toonId] = toon.getRightHands()[0]
def handleToonExited(self, toonId): DistributedPartyTeamActivity.handleToonExited(self, toonId) if toonId == base.localAvatar.doId: self.cameraMoveIval.pause() if toonId not in self.fallenToons: if toonId in self.toonIdsToAnimIntervals and self.toonIdsToAnimIntervals[ toonId] is not None: self.toonIdsToAnimIntervals[toonId].finish() toon = self.getAvatar(toonId) targetH = fitDestAngle2Src(toon.getH(self.root), 180.0) targetPos = self.hopOffPositions[self.getTeam(toonId)][ self.getIndex(toonId, self.getTeam(toonId))] hopOffAnim = Sequence( Func(toon.startPosHprBroadcast, 0.1), toon.hprInterval(0.2, VBase3(targetH, 0.0, 0.0), other=self.root), Func(toon.b_setAnimState, 'jump', 1.0), Wait(0.4), PartyUtils.arcPosInterval(0.75, toon, targetPos, 5.0, self.root), Func(toon.stopPosHprBroadcast), Func(toon.sendCurrentPosition), Func(self.hopOffFinished, toonId)) self.toonIdsToAnimIntervals[toonId] = hopOffAnim self._hopOffFinishedSV.set(False) self.toonIdsToAnimIntervals[toonId].start() else: self._hopOffFinishedSV.set(True) del self.toonIdsToAnimIntervals[toonId] return
def generate(self): DistributedPartyTeamActivity.generate(self) self._hopOffFinishedSV = StateVar(True) self._rewardFinishedSV = StateVar(True) self._isWalkStateReadyFC = FunctionCall(self._testWalkStateReady, self._hopOffFinishedSV, self._rewardFinishedSV)
def handleToonJoined(self, toonId): DistributedPartyTeamActivity.handleToonJoined(self, toonId) self.toonIdsToAnimIntervals[toonId] = None if toonId == base.localAvatar.doId: base.cr.playGame.getPlace().fsm.request("activity") camera.wrtReparentTo(self.root) self.cameraMoveIval = LerpPosHprInterval( camera, 1.5, PartyGlobals.TugOfWarCameraPos, PartyGlobals.TugOfWarCameraInitialHpr, other=self.root ) self.cameraMoveIval.start() self.localToonPosIndex = self.getIndex(base.localAvatar.doId, self.localToonTeam) self.notify.debug("posIndex: %d" % self.localToonPosIndex) toon = self.getAvatar(toonId) targetPos = self.dockPositions[self.localToonTeam][self.localToonPosIndex] if toon.getZ(self.root) < PartyGlobals.TugOfWarToonPositionZ: toon.setZ(self.root, PartyGlobals.TugOfWarToonPositionZ) targetH = fitDestAngle2Src(toon.getH(self.root), PartyGlobals.TugOfWarHeadings[self.localToonTeam]) travelVector = targetPos - toon.getPos(self.root) duration = travelVector.length() / 5.0 if self.toonIdsToAnimIntervals[toonId] is not None: self.toonIdsToAnimIntervals[toonId].finish() self.toonIdsToAnimIntervals[toonId] = Sequence( Func(toon.startPosHprBroadcast, 0.1), Func(toon.b_setAnimState, "run"), LerpPosHprInterval(toon, duration, targetPos, VBase3(targetH, 0.0, 0.0), other=self.root), Func(toon.stopPosHprBroadcast), Func(toon.b_setAnimState, "neutral"), ) self.toonIdsToAnimIntervals[toonId].start() return
def startConclusion(self, losingTeam): DistributedPartyTeamActivity.startConclusion(self, losingTeam) if self.isLocalToonPlaying: self._rewardFinishedSV.set(False) if losingTeam == PartyGlobals.TeamActivityNeitherTeam: self.setStatus(TTLocalizer.PartyTeamActivityGameTie) else: self.setStatus(TTLocalizer.PartyTugOfWarGameEnd) self.showStatus() if losingTeam == PartyGlobals.TeamActivityNeitherTeam: for toonId in self.getToonIdsAsList(): if self.getAvatar(toonId): self.getAvatar(toonId).loop('neutral') else: for toonId in self.toonIds[losingTeam]: if self.getAvatar(toonId): self.getAvatar(toonId).loop('neutral') for toonId in self.toonIds[1 - losingTeam]: if self.getAvatar(toonId): self.getAvatar(toonId).loop('victory') for ival in self.toonIdsToAnimIntervals.values(): if ival is not None: ival.finish() return
def handleToonJoined(self, toonId): DistributedPartyTeamActivity.handleToonJoined(self, toonId) toon = base.cr.doId2do.get(toonId, None) team = self.getTeam(toonId) if toon is not None and self.view is not None: self.view.handleToonJoined(toon, team) return
def startActive(self): DistributedPartyTeamActivity.startActive(self) self.toonIdsToStartPositions.clear() self.toonIdsToIsPullingFlags.clear() for toonId in self.getToonIdsAsList(): self.toonIdsToIsPullingFlags[toonId] = False toon = self.getAvatar(toonId) if toon: self.toonIdsToStartPositions[toonId] = toon.getPos(self.root) else: self.notify.warning("couldn't find toon %d assigning 0,0,0 to startPos" % toonId) self.toonIdsToStartPositions[toonId] = Point3(0, 0, 0) self.unusedFallenPositionsIndices = [0, 1, 2, 3] self.setupInterval = Parallel(self.globalSetupInterval) if self.isLocalToonPlaying: self.keyTTL = [] self.idealForce = 0.0 self.keyRate = 0 self.rateMatchAward = 0.0 self.allOutMode = False self.setIdealRate(PartyGlobals.TugOfWarTargetRateList[0][1]) self.setupInterval.append(self.localSetupInterval) self.setupInterval.start()
def startRules(self): DistributedPartyTeamActivity.startRules(self) self.setUpRopes() # display rules to the local toon if we have one if self.isLocalToonPlaying: self.showControls()
def __init__(self, cr): """ cr: instance of ClientRepository """ DistributedPartyTeamActivity.__init__( self, cr, PartyGlobals.ActivityIds.PartyTugOfWar, startDelay=PartyGlobals.TugOfWarStartDelay) assert (self.notify.debug("__init__")) # these are the indices of the active buttons self.buttons = [0, 1] # these variables are used for calculation how fast the player is pressing the keys self.arrowKeys = None self.keyTTL = [] self.idealRate = 0.0 self.keyRate = 0 self.allOutMode = False self.rateMatchAward = 0.0 # bonus for consistently hitting the ideal rate self.toonIdsToStartPositions = {} # initial positions of toons self.toonIdsToIsPullingFlags = {} # whether or not a toon is pulling self.toonIdsToRightHands = {} # used for setting up ropes self.fallenToons = [] # toons in the water self.fallenPositions = [] self.unusedFallenPositionsIndices = [0, 1, 2, 3] self.toonIdsToAnimIntervals = {} self.tugRopes = []
def finishWaitForServer(self): DistributedPartyTeamActivity.finishWaitForServer(self) # check for a non-standard transition and do additional cleanup as needed if self.activityFSM.getCurrentOrNextState() == "WaitForEnough": self.hideRopes() self.hideControls()
def startActive(self): DistributedPartyTeamActivity.startActive(self) self.view.startActivity(self.getCurrentActivityTime()) self.view.closeArenaDoors() if not self.isLocalToonPlaying: self.view.showArenaDoorTimers( self._duration + PartyGlobals.CogActivityConclusionDuration + 1.0 - self.getCurrentActivityTime())
def finishActive(self): DistributedPartyTeamActivity.finishActive(self) self.hideControls() self.disableKeys() self.setupInterval.pause() self.reportToServerInterval.pause() self.updateKeyPressRateInterval.pause() self.updateIdealRateInterval.pause() self.hideRopes()
def setToonsPlaying(self, leftTeamToonIds, rightTeamToonIds): """Overrides DistributedPartyActivity's setToonsPlaying""" DistributedPartyTeamActivity.setToonsPlaying(self, leftTeamToonIds, rightTeamToonIds) # update table of right hands self.toonIdsToRightHands.clear() for toonId in self.getToonIdsAsList(): toon = self.getAvatar(toonId) if toon: self.toonIdsToRightHands[toonId] = toon.getRightHands()[0]
def __init__(self, cr, arenaModel='phase_13/models/parties/cogPieArena_model', texture=None): DistributedPartyTeamActivity.__init__( self, cr, PartyGlobals.ActivityIds.PartyCog, startDelay=PartyGlobals.CogActivityStartDelay, balanceTeams=PartyGlobals.CogActivityBalanceTeams) self.arenaModel = arenaModel self.texture = texture
def announceGenerate(self): DistributedPartyTeamActivity.announceGenerate(self) # Because setToonsPlaying is a required field # And load is called at announceGenerate # The toons that are in that activity to be positioned # in the view after we get all the data and the view is loaded. for i in range(len(self.toonIds)): for toonId in self.toonIds[i]: toon = base.cr.doId2do.get(toonId, None) if toon: self.view.handleToonJoined(toon, i, lateEntry=True)
def startActive(self): DistributedPartyTeamActivity.startActive(self) self.view.startActivity(self.getCurrentActivityTime()) self.view.closeArenaDoors() # That extra second for lag + door intervals and so forth... # But show only if the local Toon is not playing in the activity. if not self.isLocalToonPlaying: self.view.showArenaDoorTimers( (self._duration + PartyGlobals.CogActivityConclusionDuration + 1.0) - self.getCurrentActivityTime())
def load(self): """ Load the necessary assets """ DistributedPartyTeamActivity.load(self) assert (self.notify.debug("load")) self.loadModels() self.loadGuiElements() self.loadSounds() self.loadIntervals() self.arrowKeys = ArrowKeys()
def handleToonJoined(self, toonId): """ Whenever a new toon joins the activity, this function is called. Parameters: toonId -- doId of the toon that joined """ DistributedPartyTeamActivity.handleToonJoined(self, toonId) toon = base.cr.doId2do.get(toonId, None) team = self.getTeam(toonId) if toon is not None and self.view is not None: self.view.handleToonJoined(toon, team)
def handleToonSwitchedTeams(self, toonId): """ Whenever a toon's switches teams, this method is called. Parameters: toonId -- doId of the toon that switched """ DistributedPartyTeamActivity.handleToonSwitchedTeams(self, toonId) toon = base.cr.doId2do.get(toonId, None) if toon is None: return if self.view is not None: self.view.handleToonSwitchedTeams(toon)
def handleToonJoined(self, toonId): DistributedPartyTeamActivity.handleToonJoined(self, toonId) self.toonIdsToAnimIntervals[toonId] = None if toonId == base.localAvatar.doId: base.cr.playGame.getPlace().fsm.request("activity") # set camera to a 3rd person view of play area camera.wrtReparentTo(self.root) self.cameraMoveIval = LerpPosHprInterval( camera, 1.5, PartyGlobals.TugOfWarCameraPos, PartyGlobals.TugOfWarCameraInitialHpr, other=self.root, ) self.cameraMoveIval.start() self.localToonPosIndex = self.getIndex(base.localAvatar.doId, self.localToonTeam) self.notify.debug("posIndex: %d" % self.localToonPosIndex) toon = self.getAvatar(toonId) targetPos = self.dockPositions[self.localToonTeam][ self.localToonPosIndex] # prevent toons from clipping through the dock by warping them to dock height if toon.getZ(self.root) < PartyGlobals.TugOfWarToonPositionZ: toon.setZ(self.root, PartyGlobals.TugOfWarToonPositionZ) targetH = fitDestAngle2Src( toon.getH(self.root), PartyGlobals.TugOfWarHeadings[self.localToonTeam]) travelVector = targetPos - toon.getPos(self.root) duration = travelVector.length() / 5.0 if self.toonIdsToAnimIntervals[toonId] is not None: self.toonIdsToAnimIntervals[toonId].finish() self.toonIdsToAnimIntervals[toonId] = Sequence( Func(toon.startPosHprBroadcast, 0.1), Func(toon.b_setAnimState, "run"), LerpPosHprInterval(toon, duration, targetPos, VBase3(targetH, 0.0, 0.0), other=self.root), Func(toon.stopPosHprBroadcast), Func(toon.b_setAnimState, "neutral"), ) self.toonIdsToAnimIntervals[toonId].start()
def handleToonExited(self, toonId): """ Whenever a toon exits the activity, this function is called. Parameters: toonId -- doId of the toon that exited """ toon = base.cr.doId2do.get(toonId, None) if toon is None: return if self.view is not None: self.view.handleToonExited(toon) DistributedPartyTeamActivity.handleToonExited(self, toonId)
def startConclusion(self, data): DistributedPartyTeamActivity.startConclusion(self, data) if self.isLocalToonPlaying: winner = 2 if data[PartyGlobals.TeamActivityTeams.LeftTeam] > data[PartyGlobals.TeamActivityTeams.RightTeam]: winner = PartyGlobals.TeamActivityTeams.LeftTeam elif data[PartyGlobals.TeamActivityTeams.LeftTeam] < data[PartyGlobals.TeamActivityTeams.RightTeam]: winner = PartyGlobals.TeamActivityTeams.RightTeam if winner < 2: if self.getTeam(base.localAvatar.doId) == winner: resultsText = TTLocalizer.PartyTeamActivityLocalAvatarTeamWins else: resultsText = TTLocalizer.PartyTeamActivityWins % TTLocalizer.PartyCogTeams[winner] else: resultsText = TTLocalizer.PartyTeamActivityGameTie self.view.showResults(resultsText, winner, data)
def __init__(self, cr): DistributedPartyTeamActivity.__init__(self, cr, PartyGlobals.ActivityIds.PartyTugOfWar, startDelay=PartyGlobals.TugOfWarStartDelay) self.buttons = [0, 1] self.arrowKeys = None self.keyTTL = [] self.idealRate = 0.0 self.keyRate = 0 self.allOutMode = False self.rateMatchAward = 0.0 self.toonIdsToStartPositions = {} self.toonIdsToIsPullingFlags = {} self.toonIdsToRightHands = {} self.fallenToons = [] self.fallenPositions = [] self.unusedFallenPositionsIndices = [0, 1, 2, 3] self.toonIdsToAnimIntervals = {} self.tugRopes = []
def handleToonJoined(self, toonId): DistributedPartyTeamActivity.handleToonJoined(self, toonId) self.toonIdsToAnimIntervals[toonId] = None if toonId == base.localAvatar.doId: base.cr.playGame.getPlace().fsm.request('activity') camera.wrtReparentTo(self.root) self.cameraMoveIval = LerpPosHprInterval( camera, 1.5, PartyGlobals.TugOfWarCameraPos, PartyGlobals.TugOfWarCameraInitialHpr, other=self.root) self.cameraMoveIval.start() self.localToonPosIndex = self.getIndex(base.localAvatar.doId, self.localToonTeam) self.notify.debug('posIndex: %d' % self.localToonPosIndex) toon = self.getAvatar(toonId) targetPos = self.dockPositions[self.localToonTeam][ self.localToonPosIndex] if toon.getZ(self.root) < PartyGlobals.TugOfWarToonPositionZ: toon.setZ(self.root, PartyGlobals.TugOfWarToonPositionZ) targetH = fitDestAngle2Src( toon.getH(self.root), PartyGlobals.TugOfWarHeadings[self.localToonTeam]) travelVector = targetPos - toon.getPos(self.root) duration = travelVector.length() / 5.0 if self.toonIdsToAnimIntervals[toonId] is not None: self.toonIdsToAnimIntervals[toonId].finish() self.toonIdsToAnimIntervals[toonId] = Sequence( Func(toon.startPosHprBroadcast, 0.1), Func(toon.b_setAnimState, 'run'), LerpPosHprInterval(toon, duration, targetPos, VBase3(targetH, 0.0, 0.0), other=self.root), Func(toon.stopPosHprBroadcast), Func(toon.b_setAnimState, 'neutral')) self.toonIdsToAnimIntervals[toonId].start() return
def handleToonExited(self, toonId): DistributedPartyTeamActivity.handleToonExited(self, toonId) # clean up local toon stuff if toonId == base.localAvatar.doId: self.cameraMoveIval.pause() # make toon jump off the dock if needed if toonId not in self.fallenToons: # finish any existing interval for that toon if toonId in self.toonIdsToAnimIntervals and \ self.toonIdsToAnimIntervals[toonId] is not None: self.toonIdsToAnimIntervals[toonId].finish() toon = self.getAvatar(toonId) # clamp targetHeading to minimize spin targetH = fitDestAngle2Src(toon.getH(self.root), 180.0) targetPos = self.hopOffPositions[self.getTeam(toonId)][ self.getIndex(toonId, self.getTeam(toonId))] hopOffAnim = Sequence( Func(toon.startPosHprBroadcast, 0.1), toon.hprInterval(0.2, VBase3(targetH, 0.0, 0.0), other=self.root), Func(toon.b_setAnimState, "jump", 1.0), Wait(0.4), PartyUtils.arcPosInterval(0.75, toon, targetPos, 5.0, self.root), Func(toon.stopPosHprBroadcast), # make sure toon ends up on the ground on remote clients Func(toon.sendCurrentPosition), Func(self.hopOffFinished, toonId), ) self.toonIdsToAnimIntervals[toonId] = hopOffAnim self._hopOffFinishedSV.set(False) self.toonIdsToAnimIntervals[toonId].start() # local toons not on the dock are put back into the walk state else: self._hopOffFinishedSV.set(True) del self.toonIdsToAnimIntervals[toonId]
def unload(self): DistributedPartyTeamActivity.unload(self) self.arrowKeys.destroy() self.unloadIntervals() self.unloadModels() self.unloadGuiElements() self.unloadSounds() if hasattr(self, 'toonIds'): del self.toonIds del self.buttons del self.arrowKeys del self.keyTTL del self.idealRate del self.keyRate del self.allOutMode del self.rateMatchAward del self.toonIdsToStartPositions del self.toonIdsToIsPullingFlags del self.toonIdsToRightHands del self.fallenToons del self.fallenPositions del self.unusedFallenPositionsIndices self.toonIdsToAnimIntervals.clear() del self.toonIdsToAnimIntervals
def finishConclusion(self): self.view.hideResults() DistributedPartyTeamActivity.finishConclusion(self) self.view.hideArenaDoorTimers()
def unload(self): if hasattr(self, 'view') and self.view is not None: self.view.unload() del self.view DistributedPartyTeamActivity.unload(self) return
def finishWaitForServer(self): DistributedPartyTeamActivity.finishWaitForServer(self) if self.activityFSM.getCurrentOrNextState() == 'WaitForEnough': self.hideRopes() self.hideControls()
def startRules(self): DistributedPartyTeamActivity.startRules(self) self.setUpRopes() if self.isLocalToonPlaying: self.showControls()
def finishWaitToStart(self): DistributedPartyTeamActivity.finishWaitToStart(self) self.__disableCollisions()
def delete(self): self._isWalkStateReadyFC.destroy() self._hopOffFinishedSV.destroy() self._rewardFinishedSV.destroy() DistributedPartyTeamActivity.delete(self)
def startWaitForEnough(self): DistributedPartyTeamActivity.startWaitForEnough(self) self.__enableCollisions()
def enable(self): DistributedPartyTeamActivity.enable(self)
def disable(self): DistributedPartyTeamActivity.disable(self)
def _testWalkStateReady(self, hoppedOff, rewardFinished): if hoppedOff and rewardFinished: DistributedPartyTeamActivity.handleRewardDone(self)
def load(self): DistributedPartyTeamActivity.load(self) self.view = PartyCogActivity(self, self.arenaModel, self.texture) self.view.load()
def finishConclusion(self): DistributedPartyTeamActivity.finishConclusion(self) self.fallenToons = []
def finishWaitForEnough(self): DistributedPartyTeamActivity.finishWaitForEnough(self) self.__disableCollisions()
def setAdvantage(self, advantage): DistributedPartyTeamActivity.setAdvantage(self, advantage) if self.isLocalToonPlaying: self.setIdealRate(PartyGlobals.TugOfWarTargetRateList[0][1])
def startWaitToStart(self, waitStartTimestamp): DistributedPartyTeamActivity.startWaitToStart(self, waitStartTimestamp) self.__enableCollisions()