本文整理汇总了Python中toontown.toon.ToonDNA.getRandomBottom方法的典型用法代码示例。如果您正苦于以下问题:Python ToonDNA.getRandomBottom方法的具体用法?Python ToonDNA.getRandomBottom怎么用?Python ToonDNA.getRandomBottom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toon.ToonDNA
的用法示例。
在下文中一共展示了ToonDNA.getRandomBottom方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __swapTorso
# 需要导入模块: from toontown.toon import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA import getRandomBottom [as 别名]
def __swapTorso(self, offset):
gender = self.toon.style.getGender()
if not self.clothesPicked:
length = len(ToonDNA.toonTorsoTypes[6:])
torsoOffset = 6
elif gender == "m":
length = len(ToonDNA.toonTorsoTypes[:3])
torsoOffset = 0
if self.toon.style.topTex not in ToonDNA.MakeAToonBoyShirts:
randomShirt = ToonDNA.getRandomTop(gender, ToonDNA.MAKE_A_TOON)
shirtTex, shirtColor, sleeveTex, sleeveColor = randomShirt
self.toon.style.topTex = shirtTex
self.toon.style.topTexColor = shirtColor
self.toon.style.sleeveTex = sleeveTex
self.toon.style.sleeveTexColor = sleeveColor
if self.toon.style.botTex not in ToonDNA.MakeAToonBoyBottoms:
botTex, botTexColor = ToonDNA.getRandomBottom(gender, ToonDNA.MAKE_A_TOON)
self.toon.style.botTex = botTex
self.toon.style.botTexColor = botTexColor
else:
length = len(ToonDNA.toonTorsoTypes[3:6])
if self.toon.style.torso[1] == "d":
torsoOffset = 3
else:
torsoOffset = 0
if self.toon.style.topTex not in ToonDNA.MakeAToonGirlShirts:
randomShirt = ToonDNA.getRandomTop(gender, ToonDNA.MAKE_A_TOON)
shirtTex, shirtColor, sleeveTex, sleeveColor = randomShirt
self.toon.style.topTex = shirtTex
self.toon.style.topTexColor = shirtColor
self.toon.style.sleeveTex = sleeveTex
self.toon.style.sleeveTexColor = sleeveColor
if self.toon.style.botTex not in ToonDNA.MakeAToonGirlBottoms:
if self.toon.style.torso[1] == "d":
botTex, botTexColor = ToonDNA.getRandomBottom(
gender, ToonDNA.MAKE_A_TOON, girlBottomType=ToonDNA.SKIRT
)
self.toon.style.botTex = botTex
self.toon.style.botTexColor = botTexColor
torsoOffset = 3
else:
botTex, botTexColor = ToonDNA.getRandomBottom(
gender, ToonDNA.MAKE_A_TOON, girlBottomType=ToonDNA.SHORTS
)
self.toon.style.botTex = botTex
self.toon.style.botTexColor = botTexColor
torsoOffset = 0
self.torsoChoice = (self.torsoChoice + offset) % length
self.__updateScrollButtons(self.torsoChoice, length, self.torsoStart, self.torsoLButton, self.torsoRButton)
torso = ToonDNA.toonTorsoTypes[torsoOffset + self.torsoChoice]
self.dna.torso = torso
self.toon.swapToonTorso(torso)
self.toon.loop("neutral", 0)
self.toon.swapToonColor(self.dna)
示例2: _BodyShop__swapTorso
# 需要导入模块: from toontown.toon import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA import getRandomBottom [as 别名]
def _BodyShop__swapTorso(self, offset):
gender = self.toon.style.getGender()
if not self.clothesPicked:
length = len(ToonDNA.toonTorsoTypes[6:])
torsoOffset = 6
elif gender == 'm':
length = len(ToonDNA.toonTorsoTypes[:3])
torsoOffset = 0
if self.dna.armColor not in ToonDNA.defaultBoyColorList:
self.dna.armColor = ToonDNA.defaultBoyColorList[0]
if self.dna.legColor not in ToonDNA.defaultBoyColorList:
self.dna.legColor = ToonDNA.defaultBoyColorList[0]
if self.dna.headColor not in ToonDNA.defaultBoyColorList:
self.dna.headColor = ToonDNA.defaultBoyColorList[0]
if self.toon.style.topTex not in ToonDNA.MakeAToonBoyShirts:
randomShirt = ToonDNA.getRandomTop(gender, ToonDNA.MAKE_A_TOON)
(shirtTex, shirtColor, sleeveTex, sleeveColor) = randomShirt
self.toon.style.topTex = shirtTex
self.toon.style.topTexColor = shirtColor
self.toon.style.sleeveTex = sleeveTex
self.toon.style.sleeveTexColor = sleeveColor
if self.toon.style.botTex not in ToonDNA.MakeAToonBoyBottoms:
(botTex, botTexColor) = ToonDNA.getRandomBottom(gender, ToonDNA.MAKE_A_TOON)
self.toon.style.botTex = botTex
self.toon.style.botTexColor = botTexColor
else:
length = len(ToonDNA.toonTorsoTypes[3:6])
if self.toon.style.torso[1] == 'd':
torsoOffset = 3
else:
torsoOffset = 0
if self.dna.armColor not in ToonDNA.defaultGirlColorList:
self.dna.armColor = ToonDNA.defaultGirlColorList[0]
if self.dna.legColor not in ToonDNA.defaultGirlColorList:
self.dna.legColor = ToonDNA.defaultGirlColorList[0]
if self.dna.headColor not in ToonDNA.defaultGirlColorList:
self.dna.headColor = ToonDNA.defaultGirlColorList[0]
if self.toon.style.topTex not in ToonDNA.MakeAToonGirlShirts:
randomShirt = ToonDNA.getRandomTop(gender, ToonDNA.MAKE_A_TOON)
(shirtTex, shirtColor, sleeveTex, sleeveColor) = randomShirt
self.toon.style.topTex = shirtTex
self.toon.style.topTexColor = shirtColor
self.toon.style.sleeveTex = sleeveTex
self.toon.style.sleeveTexColor = sleeveColor
if self.toon.style.botTex not in ToonDNA.MakeAToonGirlBottoms:
if self.toon.style.torso[1] == 'd':
(botTex, botTexColor) = ToonDNA.getRandomBottom(gender, ToonDNA.MAKE_A_TOON, girlBottomType = ToonDNA.SKIRT)
self.toon.style.botTex = botTex
self.toon.style.botTexColor = botTexColor
torsoOffset = 3
else:
(botTex, botTexColor) = ToonDNA.getRandomBottom(gender, ToonDNA.MAKE_A_TOON, girlBottomType = ToonDNA.SHORTS)
self.toon.style.botTex = botTex
self.toon.style.botTexColor = botTexColor
torsoOffset = 0
self.torsoChoice = (self.torsoChoice + offset) % length
self._BodyShop__updateScrollButtons(self.torsoChoice, length, self.torsoStart, self.torsoLButton, self.torsoRButton)
torso = ToonDNA.toonTorsoTypes[torsoOffset + self.torsoChoice]
self.dna.torso = torso
self.toon.swapToonTorso(torso)
self.toon.loop('neutral', 0)
self.toon.swapToonColor(self.dna)