本文整理汇总了Python中toontown.distributed.ToontownInternalRepository.ToontownInternalRepository.handleConnected方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownInternalRepository.handleConnected方法的具体用法?Python ToontownInternalRepository.handleConnected怎么用?Python ToontownInternalRepository.handleConnected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.distributed.ToontownInternalRepository.ToontownInternalRepository
的用法示例。
在下文中一共展示了ToontownInternalRepository.handleConnected方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handleConnected
# 需要导入模块: from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository [as 别名]
# 或者: from toontown.distributed.ToontownInternalRepository.ToontownInternalRepository import handleConnected [as 别名]
def handleConnected(self):
ToontownInternalRepository.handleConnected(self)
if config.GetBool('want-ClientServicesManagerUD', self.wantUD):
# Only generate the root object once, with the CSMUD.
rootObj = DistributedDirectoryAI(self)
rootObj.generateWithRequiredAndId(self.getGameDoId(), 0, 0)
self.createGlobals()
示例2: handleConnected
# 需要导入模块: from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository [as 别名]
# 或者: from toontown.distributed.ToontownInternalRepository.ToontownInternalRepository import handleConnected [as 别名]
def handleConnected(self):
self.notify.info('Yarn. Waking up (This may take a while!).')
ToontownInternalRepository.handleConnected(self)
self.districtId = self.allocateChannel()
self.distributedDistrict = ToontownDistrictAI(self)
self.distributedDistrict.setName(self.districtName)
self.distributedDistrict.generateWithRequiredAndId(
self.districtId, self.getGameDoId(), 2)
# Claim ownership of that district...
dg = PyDatagram()
dg.addServerHeader(
self.districtId,
self.ourChannel,
STATESERVER_OBJECT_SET_AI)
dg.addChannel(self.ourChannel)
self.send(dg)
self.notify.info('Creating Global Managers')
self.createGlobals()
self.notify.info('Creating Toontown')
self.createZones()
self.statusSender.start()
self.distributedDistrict.b_setAvailable(1)
self.notify.info('District is now ready.')
示例3: handleConnected
# 需要导入模块: from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository [as 别名]
# 或者: from toontown.distributed.ToontownInternalRepository.ToontownInternalRepository import handleConnected [as 别名]
def handleConnected(self):
ToontownInternalRepository.handleConnected(self)
rootObj = DistributedDirectoryAI(self)
rootObj.generateWithRequiredAndId(self.getGameDoId(), 0, 0)
if config.GetBool('want-rpc-server', False):
endpoint = config.GetString('rpc-server-endpoint', 'http://localhost:8080/')
self.rpcServer = ToontownRPCServer(endpoint, ToontownRPCHandler(self))
self.rpcServer.start(useTaskChain=True)
self.createGlobals()
self.notify.info('Done.')
示例4: handleConnected
# 需要导入模块: from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository [as 别名]
# 或者: from toontown.distributed.ToontownInternalRepository.ToontownInternalRepository import handleConnected [as 别名]
def handleConnected(self):
ToontownInternalRepository.handleConnected(self)
self.notify.info(True)
if config.GetBool("want-ClientServicesManagerUD", self.wantUD):
self.notify.info("Creating ClientServicesManagerUD...")
# Only generate the root object once, with the CSMUD.
rootObj = DistributedDirectoryAI(self)
rootObj.generateWithRequiredAndId(self.getGameDoId(), 0, 0)
self.notify.info("Creating globals...")
self.createGlobals()
if config.GetBool("want-rpc-server", False):
self.notify.info("Starting RPC server...")
import ToontownRPCHandler
self.rpcserver = RPCServer(ToontownRPCHandler(self))
self.notify.info("Done.")
示例5: handleConnected
# 需要导入模块: from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository [as 别名]
# 或者: from toontown.distributed.ToontownInternalRepository.ToontownInternalRepository import handleConnected [as 别名]
def handleConnected(self):
ToontownInternalRepository.handleConnected(self)
threading.Thread(target=self.startDistrict).start()