本文整理匯總了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()])
示例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()