本文整理汇总了Python中direct.distributed.DistributedNode.DistributedNode.announceGenerate方法的典型用法代码示例。如果您正苦于以下问题:Python DistributedNode.announceGenerate方法的具体用法?Python DistributedNode.announceGenerate怎么用?Python DistributedNode.announceGenerate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类direct.distributed.DistributedNode.DistributedNode
的用法示例。
在下文中一共展示了DistributedNode.announceGenerate方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: announceGenerate
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import announceGenerate [as 别名]
def announceGenerate(self):
DistributedNode.announceGenerate(self)
self.kart = loader.loadModel('phase_6/models/karting/Kart3_Final.bam')
self.kart.find('**/decals').removeNode()
self.kart.reparentTo(self)
self.pod = loader.loadModel('phase_4/models/minigames/pods_truck.egg')
self.pod.reparentTo(self)
self.pod.setScale(0.2)
self.pod.setY(8.5)
self.pod.setH(180)
self.rope = Rope()
self.rope.ropeNode.setUseVertexColor(1)
self.rope.setup(3, ({'node': self.kart,
'point': (0, 1.5, 0.7),
'color': (0, 0, 0, 1),
'thickness': 1000}, {'node': self.kart,
'point': (0, 1.5, 0.7),
'color': (0, 0, 0, 1),
'thickness': 1000}, {'node': self.pod,
'point': (0, 31, 5),
'color': (0, 0, 0, 1),
'thickness': 1000}), [])
self.rope.setH(180)
self.rope.reparentTo(self)
sphere = CollisionSphere(0, 0, 0, 2)
sphere.setTangible(0)
node = CollisionNode(self.uniqueName('truck_trigger'))
node.addSolid(sphere)
node.setCollideMask(CIGlobals.WallBitmask)
self.triggerNP = self.attachNewNode(node)
self.triggerNP.setPos(0, 8.0, 2.0)
self.setScale(2.0)
self.accept('enter' + self.triggerNP.node().getName(), self.__handleTruckTrigger)
示例2: announceGenerate
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import announceGenerate [as 别名]
def announceGenerate(self):
DistributedNode.announceGenerate(self)
if self.cr.activeWorld == None or self.cr.activeWorld.getType() != PiratesGlobals.INSTANCE_PVP:
self.setupCollisions()
self.geom.hide(OTPRender.MainCameraBitmask)
self.geom.showThrough(OTPRender.EnviroCameraBitmask)
示例3: announceGenerate
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import announceGenerate [as 别名]
def announceGenerate(self):
base.loadingScreen.tick()
DistributedNode.announceGenerate(self)
base.worldCreator.registerSpecialNodes(self, self.uniqueId)
self.areaType = base.worldCreator.getFieldFromUid(self.uniqueId, 'Visibility')
self.envSettings = base.worldCreator.getEnvSettingsByUid(self.uniqueId)
self.builder = base.worldCreator.getBuilder(self, self.areaType)
示例4: announceGenerate
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import announceGenerate [as 别名]
def announceGenerate(self):
DistributedNode.announceGenerate(self)
self.reparentTo(render)
self.loadBarrel()
self.loadIcon()
self.loadCollisions()
self.accept(self.uniqueName('enterBarrelSphere'), self.__handleEnterSphere)
开发者ID:Toontown-Electrified,项目名称:src-feature-the-experiment,代码行数:11,代码来源:DistributedExperimentBarrel.py
示例5: announceGenerate
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import announceGenerate [as 别名]
def announceGenerate(self):
DistributedNode.announceGenerate(self)
self.reparentTo(self.getParentObj())
self.createSpheres()
self.enableDeploySpheres(False)
self.accept(self.uniqueName('enterShipDeploySphere'), self.handleShipCollideEnter)
self.accept(self.uniqueName('exitShipDeploySphere'), self.handleShipCollideExit)
self.accept(self.uniqueName('enterShipDeploy-MaxSphereSoft'), self.handleShipEnterSoftBarrier)
self.accept(self.uniqueName('exitShipDeploy-MaxSphereSoft'), self.handleShipExitSoftBarrier)
self.accept(self.uniqueName('enterShipDeploy-MaxSphereHard'), self.handleShipEnterHardBarrier)
self.accept(self.uniqueName('exitShipDeploy-MaxSphereHard'), self.handleShipExitHardBarrier)
self.accept(self.uniqueName('enterShipDeploy-MinSphere'), self.handleShipEnterMinSphere)
self.accept(self.uniqueName('exitShipDeploy-MinSphere'), self.handleShipExitMinSphere)
self.accept('settingLocalShip', self.unlockMessages)
示例6: announceGenerate
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import announceGenerate [as 别名]
def announceGenerate(self):
""" This method is called after generate(), after all of the
required fields have been filled in. At the time of this call,
the distributed object is ready for use. """
DistributedNode.announceGenerate(self)
示例7: announceGenerate
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import announceGenerate [as 别名]
def announceGenerate(self):
DistributedNode.announceGenerate(self)
self.makeCannon()
示例8: announceGenerate
# 需要导入模块: from direct.distributed.DistributedNode import DistributedNode [as 别名]
# 或者: from direct.distributed.DistributedNode.DistributedNode import announceGenerate [as 别名]
def announceGenerate(self):
DistributedNode.announceGenerate(self)
self.__initCollisions("shopSphere" + str(self.doId))
self.setupClerk()
self.setParent(CIGlobals.SPRender)