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


Python SuitBattleGlobals.getFaceoffTaunt方法代码示例

本文整理汇总了Python中toontown.battle.SuitBattleGlobals.getFaceoffTaunt方法的典型用法代码示例。如果您正苦于以下问题:Python SuitBattleGlobals.getFaceoffTaunt方法的具体用法?Python SuitBattleGlobals.getFaceoffTaunt怎么用?Python SuitBattleGlobals.getFaceoffTaunt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在toontown.battle.SuitBattleGlobals的用法示例。


在下文中一共展示了SuitBattleGlobals.getFaceoffTaunt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: sayFaceoffTaunt

# 需要导入模块: from toontown.battle import SuitBattleGlobals [as 别名]
# 或者: from toontown.battle.SuitBattleGlobals import getFaceoffTaunt [as 别名]
 def sayFaceoffTaunt(self, custom = False, phrase = "", dialogue = None):
     if custom:
         self.setChatAbsolute(phrase, CFSpeech | CFTimeout, dialogue)
     elif not custom:
         if random.random() < 0.2:
             taunt = SuitBattleGlobals.getFaceoffTaunt(self.getStyleName(), self.doId, randomChoice = True)
             self.setChatAbsolute(taunt, CFSpeech | CFTimeout)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:9,代码来源:DistributedInvasionSuit.py

示例2: sayFaceoffTaunt

# 需要导入模块: from toontown.battle import SuitBattleGlobals [as 别名]
# 或者: from toontown.battle.SuitBattleGlobals import getFaceoffTaunt [as 别名]
 def sayFaceoffTaunt(self, custom=False, phrase="", dialogue=None):
     if custom:
         self.virtualSuit.setChatAbsolute(phrase, CFSpeech | CFTimeout, dialogue)
     else:
         if self.attackProp == 'teeth':
             taunt = SuitBattleGlobals.getAttackTaunt(random.choice(['Bite', 'Chomp']))
         elif self.attackProp == 'synergy':
             taunt = SuitBattleGlobals.getAttackTaunt('Synergy')
         elif self.attackProp == 'golf-ball':
             taunt = SuitBattleGlobals.getAttackTaunt('TeeOff')
         elif self.attackProp == 'baseball':
             taunt = SuitBattleGlobals.getAttackTaunt('PlayHardball')
         elif self.attackProp == 'write-off':
             taunt = SuitBattleGlobals.getAttackTaunt('WriteOff')
         elif self.attackProp == 'crunch':
             taunt = SuitBattleGlobals.getAttackTaunt('Crunch')
         else:
             taunt = SuitBattleGlobals.getFaceoffTaunt(self.virtualSuit.style.name, self.doId)
         self.virtualSuit.setChatAbsolute(taunt, CFSpeech | CFTimeout)
开发者ID:NostalgicTTR,项目名称:Toontown-Infinite-2016-Leak,代码行数:21,代码来源:DistributedVirtualGoon.py

示例3: __faceOff

# 需要导入模块: from toontown.battle import SuitBattleGlobals [as 别名]
# 或者: from toontown.battle.SuitBattleGlobals import getFaceoffTaunt [as 别名]
    def __faceOff(self, ts, name, callback):
        if len(self.suits) == 0:
            self.notify.warning('__faceOff(): no suits.')
            return
        if len(self.toons) == 0:
            self.notify.warning('__faceOff(): no toons.')
            return
        toon = self.toons[0]
        point = self.toonPoints[0][0]
        toonPos = point[0]
        toonHpr = VBase3(point[1], 0.0, 0.0)
        p = toon.getPos(self)
        toon.setPos(self, p[0], p[1], 0.0)
        toon.setShadowHeight(0)
        if len(self.suits) == 1:
            leaderIndex = 0
        elif self.bossBattle == 1:
            for suit in self.suits:
                if suit.boss:
                    leaderIndex = self.suits.index(suit)
                    break

        else:
            maxTypeNum = -1
            for suit in self.suits:
                suitTypeNum = SuitDNA.getSuitType(suit.dna.name)
                if maxTypeNum < suitTypeNum:
                    maxTypeNum = suitTypeNum
                    leaderIndex = self.suits.index(suit)

        delay = FACEOFF_TAUNT_T
        suitTrack = Parallel()
        suitLeader = None
        for suit in self.suits:
            suit.setState('Battle')
            suitIsLeader = 0
            oneSuitTrack = Sequence()
            oneSuitTrack.append(Func(suit.loop, 'neutral'))
            oneSuitTrack.append(Func(suit.headsUp, toonPos))
            if self.suits.index(suit) == leaderIndex:
                suitLeader = suit
                suitIsLeader = 1
                if self.bossBattle == 1 and self.levelDoId in base.cr.doId2do:
                    level = base.cr.doId2do[self.levelDoId]
                    if suit.boss:
                        taunt = level.getBossTaunt()
                    else:
                        taunt = level.getBossBattleTaunt()
                else:
                    taunt = SuitBattleGlobals.getFaceoffTaunt(suit.getStyleName(), suit.doId)
                oneSuitTrack.append(Func(suit.setChatAbsolute, taunt, CFSpeech | CFTimeout))
            destPos, destHpr = self.getActorPosHpr(suit, self.suits)
            oneSuitTrack.append(Wait(delay))
            if suitIsLeader == 1:
                oneSuitTrack.append(Func(suit.clearChat))
            oneSuitTrack.append(self.createAdjustInterval(suit, destPos, destHpr))
            suitTrack.append(oneSuitTrack)

        suitHeight = suitLeader.getHeight()
        suitOffsetPnt = Point3(0, 0, suitHeight)
        toonTrack = Parallel()
        for toon in self.toons:
            oneToonTrack = Sequence()
            destPos, destHpr = self.getActorPosHpr(toon, self.toons)
            oneToonTrack.append(Wait(delay))
            oneToonTrack.append(self.createAdjustInterval(toon, destPos, destHpr, toon=1, run=1))
            toonTrack.append(oneToonTrack)

        if self.hasLocalToon():
            MidTauntCamHeight = suitHeight * 0.66
            MidTauntCamHeightLim = suitHeight - 1.8
            if MidTauntCamHeight < MidTauntCamHeightLim:
                MidTauntCamHeight = MidTauntCamHeightLim
            TauntCamY = 18
            TauntCamX = 0
            TauntCamHeight = random.choice((MidTauntCamHeight, 1, 11))
            camTrack = Sequence()
            camTrack.append(Func(base.camera.reparentTo, suitLeader))
            camTrack.append(Func(base.camLens.setMinFov, self.camFOFov/(4./3.)))
            camTrack.append(Func(base.camera.setPos, TauntCamX, TauntCamY, TauntCamHeight))
            camTrack.append(Func(base.camera.lookAt, suitLeader, suitOffsetPnt))
            camTrack.append(Wait(delay))
            camTrack.append(Func(base.camLens.setMinFov, self.camFov/(4./3.)))
            camTrack.append(Func(base.camera.wrtReparentTo, self))
            camTrack.append(Func(base.camera.setPos, self.camFOPos))
            camTrack.append(Func(base.camera.lookAt, suit))
        mtrack = Parallel(suitTrack, toonTrack)
        if self.hasLocalToon():
            NametagGlobals.setWant2dNametags(False)
            mtrack = Parallel(mtrack, camTrack)
        done = Func(callback)
        track = Sequence(mtrack, done, name=name)
        track.start(ts)
        self.storeInterval(track, name)
        return
开发者ID:NostalgicTTR,项目名称:Toontown-Infinite-2016-Leak,代码行数:97,代码来源:DistributedLevelBattle.py


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