本文整理汇总了Python中Resources.ability方法的典型用法代码示例。如果您正苦于以下问题:Python Resources.ability方法的具体用法?Python Resources.ability怎么用?Python Resources.ability使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resources
的用法示例。
在下文中一共展示了Resources.ability方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import Resources [as 别名]
# 或者: from Resources import ability [as 别名]
def __init__(self, name, stats, type_):
Equipment.__init__(self, name, stats)
self._weaponType = type_
if self._weaponType == Weapon.HAND:
self._attack = Resources.ability('weapon-hand')
if self._weaponType == Weapon.SWORD:
self._attack = Resources.ability('weapon-sword')
if self._weaponType == Weapon.DAGGER:
self._attack = Resources.ability('weapon-dagger')
if self._weaponType == Weapon.STAFF:
self._attack = Resources.ability('weapon-staff')
if self._weaponType == Weapon.MACE:
self._attack = Resources.ability('weapon-mace')
if self._weaponType == Weapon.BOW:
self._attack = Resources.ability('weapon-bow')
示例2: testMinimalAbilityLoading
# 需要导入模块: import Resources [as 别名]
# 或者: from Resources import ability [as 别名]
def testMinimalAbilityLoading(self):
'''Load the test Rush ability, verify all bits showed up'''
rush = Resources.ability('rush')
self.assertEqual(rush.name(),'Rush')