当前位置: 首页>>代码示例>>Python>>正文


Python WeaponGlobals.getAllAmmoSkills方法代码示例

本文整理汇总了Python中pirates.battle.WeaponGlobals.getAllAmmoSkills方法的典型用法代码示例。如果您正苦于以下问题:Python WeaponGlobals.getAllAmmoSkills方法的具体用法?Python WeaponGlobals.getAllAmmoSkills怎么用?Python WeaponGlobals.getAllAmmoSkills使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pirates.battle.WeaponGlobals的用法示例。


在下文中一共展示了WeaponGlobals.getAllAmmoSkills方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from pirates.battle import WeaponGlobals [as 别名]
# 或者: from pirates.battle.WeaponGlobals import getAllAmmoSkills [as 别名]
 def __init__(self, inventoryUIManager):
     self.inventoryUIManager = inventoryUIManager
     InventoryPage.InventoryPage.__init__(self)
     self.initialiseoptions(InventoryBagPage)
     self.containerList = []
     self.containersToShowTrash = []
     self.treasureTab = None
     self.isReady = 0
     self.treasurePageReopen = 0
     self.openedContainer = None
     self.redeemCodeGUI = None
     self.buttonSize = self.inventoryUIManager.standardButtonSize
     self.weaponBag = self.addContainer(InventoryUIWeaponContainer.InventoryUIWeaponContainer(self.inventoryUIManager, self.buttonSize * 6.0, self.buttonSize * 5.0, 6, 5, slotList = range(Locations.RANGE_WEAPONS[0], Locations.RANGE_WEAPONS[0] + 30)))
     self.clothingBag = self.addContainer(InventoryUIClothingContainer.InventoryUIClothingContainer(self.inventoryUIManager, self.buttonSize * 5.0, self.buttonSize * 7.0, 5, 7, slotList = range(Locations.RANGE_CLOTHES[0], Locations.RANGE_CLOTHES[0] + 35)))
     self.jewelryBag = self.addContainer(InventoryUIJewelryContainer.InventoryUIJewelryContainer(self.inventoryUIManager, self.buttonSize * 4.0, self.buttonSize * 7.0, 4, 7, slotList = range(Locations.RANGE_JEWELERY_AND_TATTOO[0], Locations.RANGE_JEWELERY_AND_TATTOO[0] + 28)))
     cardRange = range(UberDogGlobals.InventoryType.begin_Cards, UberDogGlobals.InventoryType.end_Cards)
     cardRange.reverse()
     self.potionBag = self.addContainer(InventoryUIConsumableContainerLocatable.InventoryUIConsumableContainerLocatable(self.inventoryUIManager, self.buttonSize * 6.0, self.buttonSize * 7.0, 6, 7, slotList = range(Locations.RANGE_CONSUMABLE[0], Locations.RANGE_CONSUMABLE[0] + 42)))
     self.ammoBag = self.addContainer(InventoryUIAmmoContainer.InventoryUIAmmoContainer(self.inventoryUIManager, self.buttonSize * 7.0, self.buttonSize * 6.0, maxCountX = 7, itemList = WeaponGlobals.getAllAmmoSkills()), showTrash = 0)
     self.materialBag = self.addContainer(InventoryUIMaterialContainer.InventoryUIMaterialContainer(self.inventoryUIManager, self.buttonSize * 7.0, self.buttonSize * 6.0, maxCountX = 7, itemList = WeaponGlobals.getAllAmmoSkills()), showTrash = 0)
     self.cardBag = self.addContainer(InventoryUICardContainer.InventoryUICardContainer(self.inventoryUIManager, self.buttonSize * 4.0, self.buttonSize * 13.0, 4, 13, minCountZ = 13, maxCountX = 4, itemList = cardRange), showTrash = 0)
     hotkeySlotStart = Locations.RANGE_EQUIP_WEAPONS[0]
     weaponKeySlotList = []
     for weaponIndex in range(Locations.RANGE_EQUIP_WEAPONS[0], Locations.RANGE_EQUIP_WEAPONS[1] + 1):
         weaponKeySlotList.append(('F%s' % weaponIndex, 'f%s' % weaponIndex, weaponIndex))
     
     weaponKeySlotList.append((PLocalizer.InventoryPageItemSlot, '', Locations.RANGE_EQUIP_ITEMS[0]))
     self.inventoryPanelHotkey = InventoryUIBeltGrid.InventoryUIBeltGrid(self.inventoryUIManager, self.buttonSize * float(len(weaponKeySlotList)), self.buttonSize, len(weaponKeySlotList), 1, weaponKeySlotList)
     self.inventoryPanelHotkey.setPos(0.42499999999999999 - 0.5 * self.inventoryPanelHotkey.sizeX, 0.0, 0.89500000000000002)
     self.inventoryPanelHotkey.reparentTo(self.weaponBag)
     self.inventoryPanelTrash = InventoryUITrashContainer.InventoryUITrashContainer(self.inventoryUIManager, self.buttonSize, self.buttonSize)
     self.inventoryPanelTrash.setup()
     self.inventoryPanelTrash.setPos(0.070000000000000007, 0.0, -0.029999999999999999)
     self.inventoryPanelTrash.reparentTo(self)
     self.inventoryPanelDrinker = InventoryUIDrinker.InventoryUIDrinker(self.inventoryUIManager, self.buttonSize, self.buttonSize)
     self.inventoryPanelDrinker.setup()
     self.inventoryPanelDrinker.setPos(0.29999999999999999, 0.0, -0.029999999999999999)
     self.inventoryPanelDrinker.reparentTo(self)
     self.inventoryPanelDressing = InventoryUIDressingContainer.InventoryUIDressingContainer(self.inventoryUIManager, self.buttonSize, self.buttonSize * 7.0, slotList = range(Locations.RANGE_EQUIP_CLOTHES[0], Locations.RANGE_EQUIP_CLOTHES[1] + 1))
     self.inventoryPanelDressing.setPos(-0.22500000000000001, 0.0, -0.0)
     self.inventoryPanelDressing.reparentTo(self.clothingBag)
     self.inventoryPanelJewelryDressing = InventoryUIJewelryDressingContainer.InventoryUIJewelryDressingContainer(self.inventoryUIManager, self.buttonSize * 2.0, self.buttonSize * 4.0, slotList = range(Locations.RANGE_EQUIP_JEWELRY[0], Locations.RANGE_EQUIP_JEWELRY[1] + 1))
     self.inventoryPanelJewelryDressing.setPos(-0.37, 0.0, 0.40999999999999998)
     self.inventoryPanelJewelryDressing.reparentTo(self.jewelryBag)
     self.inventoryPanelTattooDressing = InventoryUITattooDressingContainer.InventoryUITattooDressingContainer(self.inventoryUIManager, self.buttonSize * 2.0, self.buttonSize * 2.0, slotList = range(Locations.RANGE_EQUIP_TATTOO[0], Locations.RANGE_EQUIP_TATTOO[1] + 1))
     self.inventoryPanelTattooDressing.setPos(-0.37, 0.0, 0.0)
     self.inventoryPanelTattooDressing.reparentTo(self.jewelryBag)
     self.inventoryPanelGold = InventoryUIGoldContainer.InventoryUIGoldContainer(self.inventoryUIManager, self.buttonSize, self.buttonSize)
     self.inventoryPanelGold.setPos(0.84999999999999998, 0.0, -0.029999999999999999)
     self.inventoryPanelGold.reparentTo(self)
     self.backTabParent = self.attachNewNode('backTabs')
     self.frontTabParent = self.attachNewNode('frontTab', sort = 2)
     self.tabBar = None
     self.tabCount = 0
     for container in self.containerList:
         container.setPos(0.14000000000000001, 0.0, 0.44)
         container.setX(0.54000000000000004 - 0.5 * container.sizeX)
         container.setZ(1.2 - container.getTotalHeight())
         container.reparentTo(self)
     
     self.weaponBag.setZ(0.20000000000000001)
     self.clothingBag.setPos(self.buttonSize * 2.0 + 0.029999999999999999, 0.0, 0.20000000000000001)
     self.jewelryBag.setPos(self.buttonSize * 3.0 + 0.040000000000000001, 0.0, 0.20999999999999999)
     self.ammoBag.setPos(self.buttonSize * 0.5 - 0.029999999999999999, 0.0, 0.248)
     self.cardBag.setPos(self.buttonSize * 1.5 - 0.02, 0.0, self.buttonSize * 2.0)
     Gui = loader.loadModel('models/gui/char_gui')
     buttonImage = (Gui.find('**/chargui_text_block_large'), Gui.find('**/chargui_text_block_large_down'), Gui.find('**/chargui_text_block_large_over'), Gui.find('**/chargui_text_block_large'))
     self.redeemCodeButton = DirectButton(parent = self, relief = None, image = buttonImage, image_scale = 0.45000000000000001, text = PLocalizer.InventoryRedeemCode, text_font = PiratesGlobals.getInterfaceOutlineFont(), text_align = TextNode.ACenter, text_pos = (0, -0.01), text_scale = PiratesGuiGlobals.TextScaleLarge, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, pos = (0.68000000000000005, 0, 0.040000000000000001), command = self.showRedeemCodeGUI)
     self.redeemCodeButton.hide()
     self.faceCameraButton = DirectButton(parent = self, relief = None, image = buttonImage, image_scale = 0.45000000000000001, text = PLocalizer.InventoryFaceCamera, text_font = PiratesGlobals.getInterfaceOutlineFont(), text_align = TextNode.ACenter, text_pos = (0, -0.01), text_scale = PiratesGuiGlobals.TextScaleLarge, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, pos = (0.37, 0, 0.040000000000000001), command = self.faceCamera)
     self.faceCameraButton.hide()
     self.notLoadedWarning = DirectLabel(parent = self, relief = DGG.SUNKEN, borderWidth = (0, 0), frameColor = (0.5, 0.14999999999999999, 0.050000000000000003, 1), text = PLocalizer.InventoryNotLoaded, text_align = TextNode.ALeft, text_font = PiratesGlobals.getInterfaceOutlineFont(), text_scale = 0.044999999999999998, text_fg = (1, 1, 1, 1), text_wordwrap = 20.0, state = DGG.DISABLED, pos = (0.10000000000000001, 0, 0.75))
     self.accept('openingContainer', self.onOpen)
     self.acceptOnce('localPirate-created', self.askInventory)
     self.accept('pickedUpItem', self.onLocatable)
     self.invRequestId = None
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:78,代码来源:InventoryBagPage.py


注:本文中的pirates.battle.WeaponGlobals.getAllAmmoSkills方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。