本文整理汇总了Python中pirates.battle.WeaponGlobals.getSkillName方法的典型用法代码示例。如果您正苦于以下问题:Python WeaponGlobals.getSkillName方法的具体用法?Python WeaponGlobals.getSkillName怎么用?Python WeaponGlobals.getSkillName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pirates.battle.WeaponGlobals
的用法示例。
在下文中一共展示了WeaponGlobals.getSkillName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __str__
# 需要导入模块: from pirates.battle import WeaponGlobals [as 别名]
# 或者: from pirates.battle.WeaponGlobals import getSkillName [as 别名]
def __str__(self):
s = 'BattleSkillDiary\n'
s += ' Skill: Timestamp\n'
for (skillId, details) in self._BattleSkillDiary__timers.items():
skillName = WeaponGlobals.getSkillName(skillId)
state = ('Idle', 'Charging')[details[0]]
dt = details[1]
timeStamp = details[2]
remaining = self.getTimeRemaining(skillId)
s += ' %s (%s): %s, dt=%f, t=%f, remaining=%f (s)\n' % (skillName, skillId, state, dt, timeStamp, remaining)
for (skillId, details) in self._BattleSkillDiary__hits.items():
skillName = WeaponGlobals.getSkillName(skillId)
hits = details[0]
remaining = self.getTimeRemaining(skillId)
s += ' %s (%s): %s, hits=%f, remaining=%f (s)\n' % (skillName, skillId, hits, remaining)
return s
示例2: update
# 需要导入模块: from pirates.battle import WeaponGlobals [as 别名]
# 或者: from pirates.battle.WeaponGlobals import getSkillName [as 别名]
#.........这里部分代码省略.........
count = 0
for skill in totalComboSkills:
skillPts = inv.getStackQuantity(skill)
if skill in self.localMods:
skillPts = self.localMods[skill]
if not skill in comboSkills:
pass
showIcon = skillPts > 0
freeLock = False
if not Freebooter.getPaidStatus(base.localAvatar.getDoId()):
if not WeaponGlobals.canFreeUse(skill):
freeLock = True
if self.linkedSkillIds.has_key(skill):
if self.skillFrames.has_key(skill):
self.skillFrames[skill].hide()
skill = self.linkedSkillIds[skill]
self.createFrame(skill, skillPts, amt, freeLock, showIcon)
x = 0.20000000000000001 + 0.17499999999999999 * count
y = 1.1100000000000001
self.skillFrames[skill].setPos(x, 0, y)
if showIcon and skillPts > 1:
self.makeBoostDisplay(skill, skillPts - 1)
if not Freebooter.getPaidStatus(base.localAvatar.getDoId()):
if not WeaponGlobals.canFreeUse(skill):
self.skillFrames[skill].skillButton['command'] = base.localAvatar.guiMgr.showNonPayer
self.skillFrames[skill].skillButton['extraArgs'] = [
'Restricted_Skill_' + WeaponGlobals.getSkillName(skill),
5]
count += 1
count = 0
for skill in totalActiveSkills:
skillPts = inv.getStackQuantity(skill)
if skill in self.localMods:
skillPts = self.localMods[skill]
(xMod, yMod) = self.ringOffset(count)
xMod *= 0.90000000000000002
yMod *= 0.90000000000000002
if not skill in activeSkills:
pass
showIcon = skillPts > 0
freeLock = False
if not Freebooter.getPaidStatus(base.localAvatar.getDoId()):
if not WeaponGlobals.canFreeUse(skill):
freeLock = True
if self.linkedSkillIds.has_key(skill):
if self.skillFrames.has_key(skill):
self.skillFrames[skill].hide()
skill = self.linkedSkillIds[skill]
self.createFrame(skill, skillPts, amt, freeLock, showIcon)
x = xMod + 0.53000000000000003
y = yMod + 0.61499999999999999