本文整理汇总了Python中pirates.distributed.DistributedInteractive.DistributedInteractive.announceGenerate方法的典型用法代码示例。如果您正苦于以下问题:Python DistributedInteractive.announceGenerate方法的具体用法?Python DistributedInteractive.announceGenerate怎么用?Python DistributedInteractive.announceGenerate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pirates.distributed.DistributedInteractive.DistributedInteractive
的用法示例。
在下文中一共展示了DistributedInteractive.announceGenerate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: announceGenerate
# 需要导入模块: from pirates.distributed.DistributedInteractive import DistributedInteractive [as 别名]
# 或者: from pirates.distributed.DistributedInteractive.DistributedInteractive import announceGenerate [as 别名]
def announceGenerate(self):
DistributedInteractive.announceGenerate(self)
ship = self.cr.doId2do[self._shipId]
NodePath.__init__(self, 'ship-%s-repairSpot-%s' % (ship.doId, self._index))
ship.repairSpots[self.doId] = self
root = ModelNode('ship-%s-repairSpot-%s' % (ship.doId, self._index))
root.setPreserveTransform(1)
self.assign(NodePath(root))
locName = PVPGlobals.RepairSpotLocatorNames[self._index]
locator = ship.findLocator('**/%s;+s' % locName)
self.setPos(locator.getPos(ship.getModelRoot()))
self.setHpr(locator.getHpr(ship.getModelRoot()))
self.setScale(locator.getScale(ship.getModelRoot()))
self.reparentTo(ship.getModelRoot())
self.setInteractOptions(proximityText = PLocalizer.InteractRepairSpot, diskRadius = 10.0, sphereScale = 6.0)
self.setAllowInteract(1)
self.checkInUse()
self._statePushes = DestructiveScratchPad(evalUsable = FunctionCall(self._evalUsableState, ship._repairSpotMgr._state.fullHealth, ship.getWheelInUseSV()).pushCurrentState())
示例2: announceGenerate
# 需要导入模块: from pirates.distributed.DistributedInteractive import DistributedInteractive [as 别名]
# 或者: from pirates.distributed.DistributedInteractive.DistributedInteractive import announceGenerate [as 别名]
def announceGenerate(self):
if not self.spot:
self.spot = loader.loadModel('models/effects/pir_m_efx_msc_digSpot')
self.spot.hide(OTPRender.MainCameraBitmask)
self.spot.showThrough(OTPRender.EnviroCameraBitmask)
self.spot.setTransparency(TransparencyAttrib.MAlpha)
self.spot.setColorScale(0.80000000000000004, 0.90000000000000002, 0.80000000000000004, 0.34999999999999998)
self.spot.setBin('shadow', -10)
self.spot.setDepthTest(0)
self.spot.setScale(50)
self.spotRoot = self.attachNewNode('geomRoot')
lod = LODNode('treeLOD')
lodNP = self.spotRoot.attachNewNode(lod)
self.spot.reparentTo(lodNP)
lod.addSwitch(100, 0)
DistributedInteractive.announceGenerate(self)
self.getParentObj().builder.addSectionObj(self, self.visZone)
示例3: announceGenerate
# 需要导入模块: from pirates.distributed.DistributedInteractive import DistributedInteractive [as 别名]
# 或者: from pirates.distributed.DistributedInteractive.DistributedInteractive import announceGenerate [as 别名]
def announceGenerate(self):
DistributedInteractive.announceGenerate(self)
self.setAllowInteract(1)
self.checkInUse()
示例4: announceGenerate
# 需要导入模块: from pirates.distributed.DistributedInteractive import DistributedInteractive [as 别名]
# 或者: from pirates.distributed.DistributedInteractive.DistributedInteractive import announceGenerate [as 别名]
def announceGenerate(self):
DistributedInteractive.announceGenerate(self)
示例5: announceGenerate
# 需要导入模块: from pirates.distributed.DistributedInteractive import DistributedInteractive [as 别名]
# 或者: from pirates.distributed.DistributedInteractive.DistributedInteractive import announceGenerate [as 别名]
def announceGenerate(self):
self.setInteractOptions(proximityText = PLocalizer.InteractSearchableContainer, sphereScale = self.getSphereScale(), diskRadius = 10, exclusive = 0)
DistributedInteractive.announceGenerate(self)
self.loadContainer()
self.getParentObj().builder.addSectionObj(self.container, self.visZone)