本文整理汇总了Python中pirates.inventory.ItemGlobals.getPrimaryColor方法的典型用法代码示例。如果您正苦于以下问题:Python ItemGlobals.getPrimaryColor方法的具体用法?Python ItemGlobals.getPrimaryColor怎么用?Python ItemGlobals.getPrimaryColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pirates.inventory.ItemGlobals
的用法示例。
在下文中一共展示了ItemGlobals.getPrimaryColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: apply
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getPrimaryColor [as 别名]
def apply(self, pirate):
gender = localAvatar.style.getGender()
if gender == 'm':
idx = ItemGlobals.getMaleModelId(self.uid)
else:
idx = ItemGlobals.getFemaleModelId(self.uid)
primaryColor = ItemGlobals.getPrimaryColor(self.uid)
secondaryColor = ItemGlobals.getSecondaryColor(self.uid)
if self.jewelryType == JewelryGlobals.LBROW:
pirate.setJewelryZone3(idx, primaryColor, secondaryColor)
elif self.jewelryType == JewelryGlobals.RBROW:
pirate.setJewelryZone4(idx, primaryColor, secondaryColor)
elif self.jewelryType == JewelryGlobals.LEAR:
pirate.setJewelryZone1(idx, primaryColor, secondaryColor)
elif self.jewelryType == JewelryGlobals.REAR:
pirate.setJewelryZone2(idx, primaryColor, secondaryColor)
elif self.jewelryType == JewelryGlobals.NOSE:
pirate.setJewelryZone5(idx, primaryColor, secondaryColor)
elif self.jewelryType == JewelryGlobals.MOUTH:
pirate.setJewelryZone6(idx, primaryColor, secondaryColor)
elif self.jewelryType == JewelryGlobals.LHAND:
pirate.setJewelryZone7(idx, primaryColor, secondaryColor)
elif self.jewelryType == JewelryGlobals.RHAND:
pirate.setJewelryZone8(idx, primaryColor, secondaryColor)
pirate.model.handleJewelryHiding()
示例2: showDetails
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getPrimaryColor [as 别名]
#.........这里部分代码省略.........
noseOffset = -0.25
mouthOffset = -0.14999999999999999
handOffset = -0.10000000000000001
elif bodyShape == 9:
bodyOffset = 0.5
if gender == 'm':
browOffset = -0.20000000000000001
earOffset = -0.20000000000000001
noseOffset = -0.29999999999999999
mouthOffset = -0.10000000000000001
handOffset = -0.050000000000000003
elif gender == 'f':
browOffset = -0.34999999999999998
earOffset = -0.34999999999999998
noseOffset = -0.45000000000000001
mouthOffset = -0.34999999999999998
handOffset = -0.20000000000000001
m = Mat4(Mat4.identMat())
itemType = ItemGlobals.getType(itemId)
if itemType == ItemGlobals.BROW:
jewelType = JewelryGlobals.LBROW
elif itemType == ItemGlobals.EAR:
jewelType = JewelryGlobals.LEAR
elif itemType == ItemGlobals.NOSE:
jewelType = JewelryGlobals.NOSE
elif itemType == ItemGlobals.MOUTH:
jewelType = JewelryGlobals.MOUTH
elif itemType == ItemGlobals.HAND:
jewelType = JewelryGlobals.LHAND
primaryColor = ItemGlobals.getPrimaryColor(itemId)
secondaryColor = ItemGlobals.getSecondaryColor(itemId)
if localAvatar.style.gender == 'm':
maleModelId = ItemGlobals.getMaleModelId(itemId)
if maleModelId:
jewelId = maleModelId
dna = HumanDNA.HumanDNA(localAvatar.style.gender)
dna.copy(localAvatar.style)
gender = 'm'
else:
jewelId = ItemGlobals.getFemaleModelId(itemId)
dna = HumanDNA.HumanDNA('f')
gender = 'f'
else:
femaleModelId = ItemGlobals.getFemaleModelId(itemId)
if femaleModelId:
jewelId = femaleModelId
dna = HumanDNA.HumanDNA(localAvatar.style.gender)
dna.copy(localAvatar.style)
gender = 'f'
else:
jewelId = ItemGlobals.getMaleModelId(itemId)
dna = HumanDNA.HumanDNA('m')
gender = 'm'
if jewelType == JewelryGlobals.LBROW:
dna.setJewelryZone3(jewelId, primaryColor, secondaryColor)
elif jewelType == JewelryGlobals.LEAR:
dna.setJewelryZone1(jewelId, primaryColor, secondaryColor)
elif jewelType == JewelryGlobals.NOSE:
dna.setJewelryZone5(jewelId, primaryColor, secondaryColor)
elif jewelType == JewelryGlobals.MOUTH:
dna.setJewelryZone6(jewelId, primaryColor, secondaryColor)
elif jewelType == JewelryGlobals.LHAND: