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


Python ToonDNA.headColor方法代码示例

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


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

示例1: requestBlackCatTransformation

# 需要导入模块: from toontown.toon.ToonDNA import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA.ToonDNA import headColor [as 别名]
    def requestBlackCatTransformation(self):
        avId = self.air.getAvatarIdFromSender()
        av = self.air.doId2do.get(avId)
        if not av: return

        if av.dna.getAnimal() == 'cat' and av.dna.headColor != 0x1a:
            newDNA = ToonDNA()
            newDNA.makeFromNetString(av.getDNAString())
            newDNA.headColor = 0x1a
            newDNA.armColor = 0x1a
            newDNA.legColor = 0x1a
            taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), 'transform-%d' % avId)

            self.sendUpdate('doBlackCatTransformation', [avId])
开发者ID:vincent15k,项目名称:Toontown-House,代码行数:16,代码来源:DistributedBlackCatMgrAI.py

示例2: requestTransformation

# 需要导入模块: from toontown.toon.ToonDNA import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA.ToonDNA import headColor [as 别名]
 def requestTransformation(self):
     avId = self.air.getAvatarIdFromSender()
     av = self.air.doId2do.get(avId)
     if av is None:
         return
     if not hasattr(av, 'dna'):
         return
     if (av.dna.headColor != 0x00):
         newDNA = ToonDNA()
         newDNA.makeFromNetString(av.getDNAString())
         newDNA.headColor = 0x00
         newDNA.armColor = 0x00
         newDNA.legColor = 0x00
         taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), 'transform-%d' % avId)
         self.sendUpdate('doTransformation', [avId])
开发者ID:v1tal,项目名称:Toontown-Pulse,代码行数:17,代码来源:DistributedNPCYangAI.py

示例3: requestTransformation

# 需要导入模块: from toontown.toon.ToonDNA import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA.ToonDNA import headColor [as 别名]
 def requestTransformation(self):
     avId = self.air.getAvatarIdFromSender()
     av = self.air.doId2do.get(avId)
     if av is None:
         return
     if not hasattr(av, "dna"):
         return
     if (av.dna.getAnimal() == "cat") and (av.dna.headColor != 0x1A):
         newDNA = ToonDNA()
         newDNA.makeFromNetString(av.getDNAString())
         newDNA.headColor = 0x1A
         newDNA.armColor = 0x1A
         newDNA.legColor = 0x1A
         taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), "transform-%d" % avId)
         self.sendUpdate("doTransformation", [avId])
开发者ID:CoolFangs,项目名称:src,代码行数:17,代码来源:DistributedNPCYinAI.py


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