本文整理匯總了Python中toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI.toonExitRequest方法的典型用法代碼示例。如果您正苦於以下問題:Python DistributedPartyActivityAI.toonExitRequest方法的具體用法?Python DistributedPartyActivityAI.toonExitRequest怎麽用?Python DistributedPartyActivityAI.toonExitRequest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI
的用法示例。
在下文中一共展示了DistributedPartyActivityAI.toonExitRequest方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: toonExitRequest
# 需要導入模塊: from toontown.parties.DistributedPartyActivityAI import DistributedPartyActivityAI [as 別名]
# 或者: from toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI import toonExitRequest [as 別名]
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()