• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python chat.ResistanceChat类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中toontown.chat.ResistanceChat的典型用法代码示例。如果您正苦于以下问题:Python ResistanceChat类的具体用法?Python ResistanceChat怎么用?Python ResistanceChat使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: __epilogueChatNext

 def __epilogueChatNext(self, pageNumber, elapsed):
     if pageNumber == 1:
         toon = self.resistanceToon
         playRate = 0.75
         track = Sequence(ActorInterval(toon, 'victory', playRate=playRate, startFrame=0, endFrame=9), ActorInterval(toon, 'victory', playRate=playRate, startFrame=9, endFrame=0), Func(self.resistanceToon.loop, 'neutral'))
         intervalName = 'EpilogueMovieToonAnim'
         self.storeInterval(track, intervalName)
         track.start()
     elif pageNumber == 3:
         self.d_applyReward()
         ResistanceChat.doEffect(self.rewardId, self.resistanceToon, self.involvedToons)
开发者ID:BmanGames,项目名称:Toontown-Level-Editor,代码行数:11,代码来源:DistributedCashbotBoss.py


示例2: giveReward

    def giveReward(self):
        for avId in self.participants:
            av = self.air.doId2do.get(avId)
            if av is None:
                continue

            for _ in xrange(self.uniteCount):
                if self.uniteType == 'any':
                    menuIndex = random.choice(ALLOWED_UNITES)
                else:
                    menuIndex = self.uniteType

                itemIndex = random.choice(ResistanceChat.getItems(menuIndex))
                textId = ResistanceChat.encodeId(menuIndex, itemIndex)

                av.addResistanceMessage(textId)
开发者ID:Toontown-Electrified,项目名称:src-feature-the-experiment,代码行数:16,代码来源:ExperimentUniteReward.py


示例3: __init__

 def __init__(self, air):
     DistributedBossCogAI.DistributedBossCogAI.__init__(self, air, 'm')
     FSM.FSM.__init__(self, 'DistributedCashbotBossAI')
     self.cranes = None
     self.safes = None
     self.goons = None
     self.treasures = {}
     self.grabbingTreasures = {}
     self.recycledTreasures = []
     self.healAmount = 0
     self.rewardId = ResistanceChat.getRandomId()
     self.rewardedToons = []
     self.scene = NodePath('scene')
     self.reparentTo(self.scene)
     cn = CollisionNode('walls')
     cs = CollisionSphere(0, 0, 0, 13)
     cn.addSolid(cs)
     cs = CollisionInvSphere(0, 0, 0, 42)
     cn.addSolid(cs)
     self.attachNewNode(cn)
     self.heldObject = None
     self.waitingForHelmet = 0
     self.avatarHelmets = {}
     self.bossMaxDamage = ToontownGlobals.CashbotBossMaxDamage
     return
开发者ID:gamerdave54321,项目名称:Toontown-House-Code,代码行数:25,代码来源:DistributedCashbotBossAI.py


示例4: enterEpilogue

 def enterEpilogue(self):
     self.cleanupIntervals()
     self.clearChat()
     self.resistanceToon.clearChat()
     self.stash()
     self.stopAnimate()
     self.controlToons()
     self.__showResistanceToon(False)
     self.resistanceToon.setPosHpr(*ToontownGlobals.CashbotBossBattleThreePosHpr)
     self.resistanceToon.loop('neutral')
     self.__arrangeToonsAroundResistanceToon()
     base.camera.reparentTo(render)
     base.camera.setPos(self.resistanceToon, -9, 12, 6)
     base.camera.lookAt(self.resistanceToon, 0, 0, 3)
     intervalName = 'EpilogueMovie'
     text = ResistanceChat.getChatText(self.rewardId)
     menuIndex, itemIndex = ResistanceChat.decodeId(self.rewardId)
     value = ResistanceChat.getItemValue(self.rewardId)
     if menuIndex == ResistanceChat.RESISTANCE_TOONUP:
         if value == -1:
             instructions = TTLocalizer.ResistanceToonToonupAllInstructions
         else:
             instructions = TTLocalizer.ResistanceToonToonupInstructions % value
     elif menuIndex == ResistanceChat.RESISTANCE_MONEY:
         if value == -1:
             instructions = TTLocalizer.ResistanceToonMoneyAllInstructions
         else:
             instructions = TTLocalizer.ResistanceToonMoneyInstructions % value
     elif menuIndex == ResistanceChat.RESISTANCE_RESTOCK:
         if value == -1:
             instructions = TTLocalizer.ResistanceToonRestockAllInstructions
         else:
             trackName = TTLocalizer.BattleGlobalTracks[value]
             instructions = TTLocalizer.ResistanceToonRestockInstructions % trackName
     elif menuIndex == ResistanceChat.RESISTANCE_MERITS:
         if value == -1:
             instructions = TTLocalizer.ResistanceToonMeritsAllInstructions
         else:
             instructions = TTLocalizer.ResistanceToonMeritsInstructions % TTLocalizer.RewardPanelMeritBarLabels[value]
     elif menuIndex == ResistanceChat.RESISTANCE_TICKETS:
         instructions = TTLocalizer.ResistanceToonTicketsInstructions % value
     speech = TTLocalizer.ResistanceToonCongratulations % (text, instructions)
     speech = self.__talkAboutPromotion(speech)
     self.resistanceToon.setLocalPageChat(speech, 0)
     self.accept('nextChatPage', self.__epilogueChatNext)
     self.accept('doneChatPage', self.__epilogueChatDone)
     base.playMusic(self.epilogueMusic, looping=1, volume=0.9)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:47,代码来源:DistributedCashbotBoss.py


示例5: __resistanceMessagesChanged

    def __resistanceMessagesChanged(self):
        self.clearMenu()
        try:
            lt = base.localAvatar
        except:
            return

        phrases = lt.resistanceMessages
        for menuIndex in ResistanceChat.resistanceMenu:
            menu = SCMenu()
            for itemIndex in ResistanceChat.getItems(menuIndex):
                textId = ResistanceChat.encodeId(menuIndex, itemIndex)
                charges = lt.getResistanceMessageCharges(textId)
                if charges > 0:
                    menu.append(TTSCResistanceTerminal(textId, charges))

            textId = ResistanceChat.encodeId(menuIndex, 0)
            menuName = ResistanceChat.getMenuName(textId)
            self.append(SCMenuHolder(menuName, menu))
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:19,代码来源:TTSCResistanceMenu.py


示例6: __init__

    def __init__(self, air):
        DistributedCashbotBossAI.__init__(self, air)

        self.rewardId = ResistanceChat.getRandomBrutalId()
        self.bossMaxDamage = ToontownGlobals.BrutalCashbotBossMaxDamage
开发者ID:MasterLoopyBM,项目名称:Loopy-TTF,代码行数:5,代码来源:DistributedBrutalCashbotBossAI.py


示例7: decodeTTSCResistanceMsg

def decodeTTSCResistanceMsg(textId):
    return ResistanceChat.getChatText(textId)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:2,代码来源:TTSCResistanceTerminal.py


示例8: __init__

 def __init__(self, textId, charges):
     SCTerminal.__init__(self)
     self.setCharges(charges)
     self.textId = textId
     self.text = ResistanceChat.getItemText(self.textId)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:5,代码来源:TTSCResistanceTerminal.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python TTWhiteList.TTWhiteList类代码示例发布时间:2022-05-27
下一篇:
Python CatalogItemList.CatalogItemList类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap