本文整理汇总了Python中toontown.toon.ToonDNA.ToonDNA.updateToonProperties方法的典型用法代码示例。如果您正苦于以下问题:Python ToonDNA.updateToonProperties方法的具体用法?Python ToonDNA.updateToonProperties怎么用?Python ToonDNA.updateToonProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toon.ToonDNA.ToonDNA
的用法示例。
在下文中一共展示了ToonDNA.updateToonProperties方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: requestBlackCatTransformation
# 需要导入模块: from toontown.toon.ToonDNA import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA.ToonDNA import updateToonProperties [as 别名]
def requestBlackCatTransformation(self):
if not self.air.newsManager.isHolidayRunning(ToontownGlobals.BLACK_CAT_DAY):
return
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do.get(avId)
if not av or av.getTutorialAck() or av.dna.getAnimal() != "cat" or av.dna.headColor == 0x1A:
return
newDNA = ToonDNA()
newDNA.makeFromNetString(av.getDNAString())
newDNA.updateToonProperties(armColor=26, legColor=26, headColor=26)
taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), "transform-%d" % avId)
self.sendUpdateToAvatarId(avId, "doBlackCatTransformation", [])