當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。