本文整理汇总了Python中toontown.toon.ToonDNA.getTopColors方法的典型用法代码示例。如果您正苦于以下问题:Python ToonDNA.getTopColors方法的具体用法?Python ToonDNA.getTopColors怎么用?Python ToonDNA.getTopColors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toon.ToonDNA
的用法示例。
在下文中一共展示了ToonDNA.getTopColors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: swapTopColor
# 需要导入模块: from toontown.toon import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA import getTopColors [as 别名]
def swapTopColor(self, offset):
self.topColorChoice += offset
colors = ToonDNA.getTopColors(self.gender, self.topStyles[self.topStyleChoice], tailorId=ToonDNA.MAKE_A_TOON)
length = len(colors)
if self.topColorChoice <= 0:
self.topColorChoice = 0
self.updateScrollButtons(self.topColorChoice, length, 0, self.topLButton, self.topRButton)
if self.topColorChoice < 0 or self.topColorChoice >= length:
self.notify.warning('topChoice index is out of range!')
self.topColorChoice = len(colors)
self.updateScrollButtons(self.topColorChoice, length, 0, self.topLButton, self.topRButton)
self.toon.style.topTexColor = colors[self.topColorChoice][0]
self.toon.style.sleeveTexColor = colors[self.topColorChoice][1]
self.toon.generateToonClothes()
if self.swapEvent != None:
messenger.send(self.swapEvent)
messenger.send('wakeup')