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


Python ToonDNA.getBottomColors方法代码示例

本文整理汇总了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')
开发者ID:Kawaiikat14,项目名称:Toontown-2-Revised,代码行数:27,代码来源:ClothesGUI.py

示例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')
开发者ID:Kawaiikat14,项目名称:Toontown-2-Revised,代码行数:20,代码来源:ClothesGUI.py


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