本文整理汇总了Python中direct.distributed.DistributedNode.DistributedNode.handleChildArrive方法的典型用法代码示例。如果您正苦于以下问题:Python DistributedNode.handleChildArrive方法的具体用法?Python DistributedNode.handleChildArrive怎么用?Python DistributedNode.handleChildArrive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类direct.distributed.DistributedNode.DistributedNode
的用法示例。
在下文中一共展示了DistributedNode.handleChildArrive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handleChildArrive
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import handleChildArrive [as 别名]
def handleChildArrive(self, childObj, zoneId):
DistributedNode.handleChildArrive(self, childObj, zoneId)
if childObj.isLocal():
base.loadingScreen.endStep('enterArea')
base.enableZoneLODs(self)
childObj.refreshActiveQuestStep()
localAvatar.guiMgr.setMinimap(self.minimap)
localAvatar.setAreaFootstep(self.footstepSound)
localAvatar.guiMgr.radarGui.showLocation(self.uniqueId)
envName = base.worldCreator.environmentTable.get(self.uniqueId)
if envName:
environmentID = TODGlobals.ENVIRONMENT_NAMES_TO_ID.get(envName, TODGlobals.ENV_DEFAULT)
envData = { }
envSettings = base.worldCreator.uidEnvSettings.get(self.uniqueId)
if envSettings != None:
envData = envSettings
base.cr.timeOfDayManager.setEnvironment(environmentID, envData)
else:
envData = None
envSettings = base.worldCreator.uidEnvSettings.get(self.uniqueId)
if envSettings != None:
envData = envSettings
base.cr.timeOfDayManager.setEnvironment(TODGlobals.ENV_INTERIOR, envData)
self.builder.arrived()
self.accept('transferMinimapObjects', self.transferMinimapObject)
if self.minimap and hasattr(childObj, 'getMinimapObject'):
if childObj.getMinimapObject():
self.laMinimapObj = childObj.getMinimapObject()
self.minimap.addObject(childObj.getMinimapObject())
示例2: handleChildArriveZone
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import handleChildArrive [as 别名]
def handleChildArriveZone(self, child, zoneId):
DistributedNode.handleChildArrive(self, child, zoneId)
if (zoneId >= self.startingZone):
if not child.gridParent:
child.gridParent = GridParent(child)
child.gridParent.setGridParent(self, zoneId)
elif child.gridParent:
child.gridParent.delete()
child.gridParent = None