def startActive(self): DistributedPartyFireworksActivityAI.notify.debug("startActive") messenger.send( PartyGlobals.FireworksStartedEvent ) showStartTimestamp = ClockDelta.globalClockDelta.getRealNetworkTime() # put clients into this state self.sendUpdate( "setState", [ "Active", # new state showStartTimestamp # when the show starts ] ) # setup to transition to Disabled after the show is over throwAwayShow = FireworkShow() showDuration = throwAwayShow.getShowDuration( self.eventId) showDuration += 20.0 taskMgr.doMethodLater( PartyGlobals.FireworksPostLaunchDelay + showDuration + PartyGlobals.FireworksTransitionToDisabledDelay, self.showComplete, self.taskName("waitForShowComplete"), ) del throwAwayShow
def createFireworkShow(self): if not self.fireworkShow: self.fireworkShow = FireworkShow(self.eventId)