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


Python DistributedPartyActivityAI.toonJoinRequest方法代碼示例

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


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

示例1: toonJoinRequest

# 需要導入模塊: from toontown.parties.DistributedPartyActivityAI import DistributedPartyActivityAI [as 別名]
# 或者: from toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI import toonJoinRequest [as 別名]
 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,代碼行數:9,代碼來源:DistributedPartyCatchActivityAI.py

示例2: toonJoinRequest

# 需要導入模塊: from toontown.parties.DistributedPartyActivityAI import DistributedPartyActivityAI [as 別名]
# 或者: from toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI import toonJoinRequest [as 別名]
    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,代碼行數:25,代碼來源:DistributedPartyTeamActivityAI.py


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