本文整理汇总了Python中SuitDNA.getDeptFullname方法的典型用法代码示例。如果您正苦于以下问题:Python SuitDNA.getDeptFullname方法的具体用法?Python SuitDNA.getDeptFullname怎么用?Python SuitDNA.getDeptFullname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SuitDNA
的用法示例。
在下文中一共展示了SuitDNA.getDeptFullname方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: announceGenerate
# 需要导入模块: import SuitDNA [as 别名]
# 或者: from SuitDNA import getDeptFullname [as 别名]
def announceGenerate(self):
DistributedBossCog.DistributedBossCog.announceGenerate(self)
self.setName(TTLocalizer.CashbotBossName)
nameInfo = TTLocalizer.BossCogNameWithDept % {'name': self.name,
'dept': SuitDNA.getDeptFullname(self.style.dept)}
self.setDisplayName(nameInfo)
target = CollisionSphere(2, 0, 0, 3)
targetNode = CollisionNode('headTarget')
targetNode.addSolid(target)
targetNode.setCollideMask(ToontownGlobals.PieBitmask)
self.headTarget = self.neck.attachNewNode(targetNode)
shield = CollisionSphere(0, 0, 0.8, 7)
shieldNode = CollisionNode('shield')
shieldNode.addSolid(shield)
shieldNode.setCollideMask(ToontownGlobals.PieBitmask)
shieldNodePath = self.pelvis.attachNewNode(shieldNode)
self.heldObject = None
self.bossDamage = 0
self.loadEnvironment()
self.__makeResistanceToon()
self.physicsMgr = PhysicsManager()
integrator = LinearEulerIntegrator()
self.physicsMgr.attachLinearIntegrator(integrator)
fn = ForceNode('gravity')
self.fnp = self.geom.attachNewNode(fn)
gravity = LinearVectorForce(0, 0, -32)
fn.addForce(gravity)
self.physicsMgr.addLinearForce(gravity)
localAvatar.chatMgr.chatInputSpeedChat.addCFOMenu()
global OneBossCog
if OneBossCog != None:
self.notify.warning('Multiple BossCogs visible.')
OneBossCog = self
return
示例2: sendInvasionStatus
# 需要导入模块: import SuitDNA [as 别名]
# 或者: from SuitDNA import getDeptFullname [as 别名]
def sendInvasionStatus(self):
if self.invading:
if self.suitDeptIndex is not None:
if self.suitTypeIndex is not None:
type = SuitBattleGlobals.SuitAttributes[self.getSuitName()]['name']
else:
type = SuitDNA.getDeptFullname(self.getSuitName())
else:
type = None
status = {
'invasion': {
'type': type,
'flags': [self.isSkelecog, self.isV2, self.isWaiter, self.isVirtual, self.isRental],
'remaining': self.remaining,
'total': self.total,
'start': self.start
}
}
else:
status = {'invasion': None}
self.air.netMessenger.send('shardStatus', [self.air.ourChannel, status])
示例3: announceGenerate
# 需要导入模块: import SuitDNA [as 别名]
# 或者: from SuitDNA import getDeptFullname [as 别名]
def announceGenerate(self):
global OneBossCog
DistributedBossCog.DistributedBossCog.announceGenerate(self)
self.setName(TTLocalizer.SellbotBossName)
nameInfo = TTLocalizer.BossCogNameWithDept % {
'name': self.name, 'dept': SuitDNA.getDeptFullname(self.style.dept)}
self.setDisplayName(nameInfo)
self.cageDoorSfx = loader.loadSfx(
'phase_5/audio/sfx/CHQ_SOS_cage_door.ogg')
self.cageLandSfx = loader.loadSfx(
'phase_9/audio/sfx/CHQ_SOS_cage_land.ogg')
self.cageLowerSfx = loader.loadSfx(
'phase_5/audio/sfx/CHQ_SOS_cage_lower.ogg')
self.piesRestockSfx = loader.loadSfx(
'phase_9/audio/sfx/CHQ_SOS_pies_restock.ogg')
self.rampSlideSfx = loader.loadSfx(
'phase_9/audio/sfx/CHQ_VP_ramp_slide.ogg')
self.strafeSfx = []
for i in range(10):
self.strafeSfx.append(
loader.loadSfx('phase_3.5/audio/sfx/SA_shred.ogg'))
render.setTag('pieCode', str(ToontownGlobals.PieCodeNotBossCog))
insidesA = CollisionPolygon(
Point3(4.0, -2.0, 5.0),
Point3(-4.0, -2.0, 5.0),
Point3(-4.0, -2.0, 0.5),
Point3(4.0, -2.0, 0.5))
insidesANode = CollisionNode('BossZap')
insidesANode.addSolid(insidesA)
insidesANode.setCollideMask(
ToontownGlobals.PieBitmask | ToontownGlobals.WallBitmask)
self.insidesANodePath = self.axle.attachNewNode(insidesANode)
self.insidesANodePath.setTag('pieCode',
str(ToontownGlobals.PieCodeBossInsides))
self.insidesANodePath.stash()
insidesB = CollisionPolygon(
Point3(-4.0, 2.0, 5.0),
Point3(4.0, 2.0, 5.0),
Point3(4.0, 2.0, 0.5),
Point3(-4.0, 2.0, 0.5))
insidesBNode = CollisionNode('BossZap')
insidesBNode.addSolid(insidesB)
insidesBNode.setCollideMask(
ToontownGlobals.PieBitmask | ToontownGlobals.WallBitmask)
self.insidesBNodePath = self.axle.attachNewNode(insidesBNode)
self.insidesBNodePath.setTag('pieCode',
str(ToontownGlobals.PieCodeBossInsides))
self.insidesBNodePath.stash()
target = CollisionTube(0, -1, 4, 0, -1, 9, 3.5)
targetNode = CollisionNode('BossZap')
targetNode.addSolid(target)
targetNode.setCollideMask(ToontownGlobals.PieBitmask)
self.targetNodePath = self.pelvis.attachNewNode(targetNode)
self.targetNodePath.setTag(
'pieCode', str(
ToontownGlobals.PieCodeBossCog))
shield = CollisionTube(0, 1, 4, 0, 1, 7, 3.5)
shieldNode = CollisionNode('BossZap')
shieldNode.addSolid(shield)
shieldNode.setCollideMask(
ToontownGlobals.PieBitmask | ToontownGlobals.CameraBitmask)
shieldNodePath = self.pelvis.attachNewNode(shieldNode)
disk = loader.loadModel('phase_9/models/char/bossCog-gearCollide')
disk.find('**/+CollisionNode').setName('BossZap')
disk.reparentTo(self.pelvis)
disk.setZ(0.8)
self.loadEnvironment()
self.__makeCagedToon()
self.__loadMopaths()
if OneBossCog is not None:
self.notify.warning('Multiple BossCogs visible.')
OneBossCog = self
return
示例4: getStyleDept
# 需要导入模块: import SuitDNA [as 别名]
# 或者: from SuitDNA import getDeptFullname [as 别名]
def getStyleDept(self):
if hasattr(self, 'dna') and self.dna:
return SuitDNA.getDeptFullname(self.dna.dept)
else:
self.notify.error('called getStyleDept() before dna was set!')
return 'unknown'