本文整理汇总了Python中pirates.inventory.ItemGlobals.getVfxType1方法的典型用法代码示例。如果您正苦于以下问题:Python ItemGlobals.getVfxType1方法的具体用法?Python ItemGlobals.getVfxType1怎么用?Python ItemGlobals.getVfxType1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pirates.inventory.ItemGlobals
的用法示例。
在下文中一共展示了ItemGlobals.getVfxType1方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getBlurColor
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getVfxType1 [as 别名]
def getBlurColor(self):
colorId = ItemGlobals.getVfxType1(self.itemId)
motion_trail_color = self.motion_color.get(colorId)
if not motion_trail_color:
motion_trail_color = self.motion_color.get(ItemGlobals.MotionBlurDefault)
return motion_trail_color[2]
示例2: getEffectColor
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getVfxType1 [as 别名]
def getEffectColor(self, itemId = None):
if not itemId:
itemId = self.itemId
effectId = ItemGlobals.getVfxType1(itemId)
color = self.effectTypeInfo.get(effectId)
return color
示例3: __init__
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getVfxType1 [as 别名]
def __init__(self, itemId):
Weapon.Weapon.__init__(self, itemId, "doll")
self.effect = None
self.effectCard = None
effectId = ItemGlobals.getVfxType1(itemId)
if not effectId:
effectId = ItemGlobals.DollDefault
self.effectColor = self.effectTypeInfo.get(effectId)[0]
card = loader.loadModel("models/effects/effectCards").find("**/" + self.effectTypeInfo.get(effectId)[1])
if not card.isEmpty():
self.effectCard = card
示例4: createTrail
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getVfxType1 [as 别名]
def createTrail(self, target):
if self.isEmpty():
return None
if not self.motion_trail:
colorId = ItemGlobals.getVfxType1(self.itemId)
motion_trail_color = self.motion_color.get(colorId)
if not motion_trail_color:
motion_trail_color = self.motion_color.get(ItemGlobals.MotionBlurDefault)
self.motion_trail = PolyTrail.PolyTrail(target, self.vertex_list, motion_trail_color)
self.motion_trail.reparentTo(self)
self.motion_trail.setUseNurbs(1)
card = loader.loadModel('models/effects/swordtrail_effects')
tex = card.find('**/swordtrail_lines').findTexture('*')
self.motion_trail.setTexture(tex)
self.motion_trail.setBlendModeOn()
if colorId == ItemGlobals.MotionBlurDark:
self.motion_trail.setBlendModeOff()
card.removeNode()