本文整理汇总了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()