当前位置: 首页>>代码示例>>Python>>正文


Python DistributedNode.announceGenerate方法代码示例

本文整理汇总了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)
开发者ID:coginvasion,项目名称:src,代码行数:35,代码来源:DistributedDeliveryTruck.py

示例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)
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:9,代码来源:DistributedTunnel.py

示例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)
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:9,代码来源:DistributedGameArea.py

示例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)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:16,代码来源:DistributedShipDeployer.py

示例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)
开发者ID:mcgillcomp361,项目名称:COMP361Project,代码行数:8,代码来源:distributedPlayer.py

示例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()
开发者ID:coginvasion,项目名称:src,代码行数:5,代码来源:DistributedToonCannon.py

示例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)
开发者ID:coginvasion,项目名称:src,代码行数:7,代码来源:DistributedShop.py


注:本文中的direct.distributed.DistributedNode.DistributedNode.announceGenerate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。