本文整理匯總了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')