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