當前位置: 首頁>>代碼示例>>Python>>正文


Python DistributedPartyActivityAI.DistributedPartyActivityAI類代碼示例

本文整理匯總了Python中toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI的典型用法代碼示例。如果您正苦於以下問題:Python DistributedPartyActivityAI類的具體用法?Python DistributedPartyActivityAI怎麽用?Python DistributedPartyActivityAI使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了DistributedPartyActivityAI類的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     FSM.__init__(self, 'DistributedPartyTrampolineActivityAI')
     self.currentAv = 0
     self.record = 0
     self.jellybeans = []
     self.collected = 0
開發者ID:CalmBit,項目名稱:ToonboxSource,代碼行數:7,代碼來源:DistributedPartyTrampolineActivityAI.py

示例2: __init__

 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.music = PartyGlobals.PhaseToMusicData40
     self.queue = []
     self.owners = []
     self.currentToon = 0
     self.playing = False
開發者ID:BmanGames,項目名稱:ToontownStride,代碼行數:7,代碼來源:DistributedPartyJukeboxActivityBaseAI.py

示例3: toonJoinRequest

 def toonJoinRequest(self):
     DistributedPartyActivityAI.toonJoinRequest(self)
     avId = self.air.getAvatarIdFromSender()
     self.player2catches[avId] = 0
     if not self.playing:
         self.__startGame()
         self.sendUpdate('setState', ['Active', globalClockDelta.getRealNetworkTime()])
開發者ID:Toonerz,項目名稱:Toontown-World-Online-Leak,代碼行數:7,代碼來源:DistributedPartyCatchActivityAI.py

示例4: __init__

 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.numGenerations = 1
     self.generations = []
     self.player2catches = {}
     self.startTimestamp = globalClockDelta.getRealNetworkTime(bits=32)
     self.playing = False
開發者ID:Toonerz,項目名稱:Toontown-World-Online-Leak,代碼行數:7,代碼來源:DistributedPartyCatchActivityAI.py

示例5: toonExitDemand

 def toonExitDemand(self):
     avId = self.air.getAvatarIdFromSender()
     if avId not in self.toonsPlaying:
         self.air.writeServerEvent('suspicious', avId=avId, issue="Toon tried to exit a party game they're not using!")
         return
     catches = self.player2catches[avId]
     del self.player2catches[avId]
     av = self.air.doId2do.get(avId, None)
     if not av:
         self.air.writeServerEvent('suspicious', avId=avId, issue='Toon tried to award beans while not in district!')
         return
     if catches > PartyGlobals.CatchMaxTotalReward:
         catches = PartyGlobals.CatchMaxTotalReward
     self.sendUpdateToAvatarId(avId, 'showJellybeanReward', [catches, av.getMoney(), TTLocalizer.PartyCatchRewardMessage % (catches, catches)])
     av.addMoney(catches)
     DistributedPartyActivityAI.toonExitDemand(self)
開發者ID:Toonerz,項目名稱:Toontown-World-Online-Leak,代碼行數:16,代碼來源:DistributedPartyCatchActivityAI.py

示例6: toonExitRequest

    def toonExitRequest(self, team):
        av = self._getCaller()
        if not av:
            return

        if not self.fsm.state_ in ('WaitForEnough', 'WaitToStart'):
            self.sendUpdateToAvatarId(av.doId, 'exitRequestDenied', [PartyGlobals.DenialReasons.Default])
            return

        if not (av.doId in self.toonIds[0] or av.doId in self.toonIds[1]):
            self.air.writeServerEvent('suspicious', avId, 'tried to switch DistributedPartyActivityAI team, but not in one')
            self.sendUpdateToAvatarId(av.doId, 'exitRequestDenied', [PartyGlobals.DenialReasons.Default])
            return

        currentTeam = (1, 0)[av.doId in self.toonIds[0]]
        self.toonIds[currentTeam].remove(av.doId)
        print self.toonsPlaying
        self.toonsPlaying.remove(av.doId)
        print self.toonsPlaying
        DistributedPartyActivityAI.toonExitRequest(self)
        self.__update()
開發者ID:nate97,項目名稱:src,代碼行數:21,代碼來源:DistributedPartyTeamActivityAI.py

示例7: toonJoinRequest

    def toonJoinRequest(self, team):
        av = self._getCaller()
        if not av:
            return

        if not self.fsm.state_ in ('WaitForEnough', 'WaitToStart'):
            self.sendUpdateToAvatarId(av.doId, 'joinRequestDenied', [PartyGlobals.DenialReasons.Default])
            return

        if len(self.toonIds[team]) >= self.getPlayersPerTeam()[1]:
            self.sendUpdateToAvatarId(av.doId, 'joinRequestDenied', [PartyGlobals.DenialReasons.Full])
            return

        if av.doId in self.toonsPlaying:
            print "Toon is already playing!"
            self.air.writeServerEvent('suspicious', av.doId, 'tried to join party team activity again!')
            self.sendUpdateToAvatarId(av.doId, 'joinRequestDenied', [PartyGlobals.DenialReasons.Default])
            return

        # idgaf if they exit unexpectedly in this case
        self.toonIds[team].append(av.doId)
        DistributedPartyActivityAI.toonJoinRequest(self)
        self.__update()
開發者ID:nate97,項目名稱:src,代碼行數:23,代碼來源:DistributedPartyTeamActivityAI.py

示例8: delete

 def delete(self):
     taskMgr.remove('playSong%d' % self.doId)
     DistributedPartyActivityAI.delete(self)
開發者ID:BmanGames,項目名稱:ToontownStride,代碼行數:3,代碼來源:DistributedPartyJukeboxActivityBaseAI.py

示例9: announceGenerate

 def announceGenerate(self):
     self.b_setState('WaitForEnough')
     DistributedPartyActivityAI.announceGenerate(self)
開發者ID:nate97,項目名稱:src,代碼行數:3,代碼來源:DistributedPartyTeamActivityAI.py

示例10: __init__

    def __init__(self, air, parent, activityTuple):
        self.toonIds = ([], [])
        self.responses = set()
        self.fsm = TeamActivityAIFSM(self)

        DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
開發者ID:nate97,項目名稱:src,代碼行數:6,代碼來源:DistributedPartyTeamActivityAI.py

示例11: __init__

 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.cloudColors = {}
     self.cloudsHit = {}
開發者ID:BmanGames,項目名稱:ToontownStride,代碼行數:4,代碼來源:DistributedPartyCannonActivityAI.py

示例12: __init__

 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.toons = []
     self.headings = []
開發者ID:CalebSmith376,項目名稱:src,代碼行數:4,代碼來源:DistributedPartyDanceActivityBaseAI.py

示例13: generate

 def generate(self):
     DistributedPartyActivityAI.generate(self)
     self.sendUpdate('setState', ['Active', globalClockDelta.getRealNetworkTime()])
開發者ID:CalebSmith376,項目名稱:src,代碼行數:3,代碼來源:DistributedPartyDanceActivityBaseAI.py

示例14: __init__

 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     FSM.__init__(self, 'DistributedPartyActivityAI')
     self.state_ = 'Idle'
開發者ID:nate97,項目名稱:src,代碼行數:4,代碼來源:DistributedPartyFireworksActivityAI.py


注:本文中的toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。