本文整理汇总了Python中pirates.battle.WeaponGlobals.getIsStaffChargeSkill方法的典型用法代码示例。如果您正苦于以下问题:Python WeaponGlobals.getIsStaffChargeSkill方法的具体用法?Python WeaponGlobals.getIsStaffChargeSkill怎么用?Python WeaponGlobals.getIsStaffChargeSkill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pirates.battle.WeaponGlobals
的用法示例。
在下文中一共展示了WeaponGlobals.getIsStaffChargeSkill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: playHitSound
# 需要导入模块: from pirates.battle import WeaponGlobals [as 别名]
# 或者: from pirates.battle.WeaponGlobals import getIsStaffChargeSkill [as 别名]
def playHitSound(self, skillId, ammoSkillId, skillResult, weaponSubType = None):
if WeaponGlobals.getIsStaffChargeSkill(skillId):
return None
if WeaponGlobals.getIsStaffAttackSkill(skillId):
return None
skillInfo = WeaponGlobals.getSkillAnimInfo(skillId)
if skillId == InventoryType.UseItem:
skillInfo = WeaponGlobals.getSkillAnimInfo(ammoSkillId)
if skillInfo:
soundFx = None
sfxs = None
if skillResult == WeaponGlobals.RESULT_HIT:
getHitSfxFunc = skillInfo[WeaponGlobals.HIT_SFX_INDEX]
if getHitSfxFunc:
sfxs = getHitSfxFunc()
elif skillResult == WeaponGlobals.RESULT_MISTIMED_HIT:
getMistimedHitSfxFunc = skillInfo[WeaponGlobals.MISTIMEDHIT_SFX_INDEX]
if getMistimedHitSfxFunc:
sfxs = getMistimedHitSfxFunc()
else:
getMissSfxFunc = skillInfo[WeaponGlobals.MISS_SFX_INDEX]
if getMissSfxFunc:
sfxs = getMissSfxFunc()
if sfxs:
if type(sfxs) == types.DictType:
if weaponSubType:
sfxList = sfxs.get(weaponSubType)
soundFx = random.choice(sfxList)
else:
soundFx = sfxs.get(ammoSkillId)
elif type(sfxs) == types.TupleType:
soundFx = random.choice(sfxs)
else:
soundFx = sfxs
if soundFx:
base.playSfx(soundFx, node = self, volume = 0.69999999999999996, cutoff = 75)