예제 #1
0
    private void populatedInventoryPanel(ItemPanel itemPanel, ItemResource itemResource, int inventoryItemIndex)
    {
        itemPanel.Initialize(itemResource, ItemPanel.ItemPanelType.INVENTORY, inventoryItemIndex, Weapon.WeaponOrder.Right, -1);
        itemPanel.SetUsed(_inventory.IsItemIndexInUsed(inventoryItemIndex));
        itemPanel.Connect(nameof(ItemPanel.ItemPanelSaleClickSignal), this, nameof(_sellItem));

        itemPanel.Show();

        itemPanel.Connect(nameof(ItemPanel.ItemPanelInventoryUseClickSignal), this, nameof(_useItem));
        itemPanel.Connect(nameof(ItemPanel.ItemPanelInventoryDropClickSignal), this, nameof(_dropItem));
    }
예제 #2
0
    private void populateWeaponChoicePanel(ItemPanel itemPanel, ItemResource itemResource, int inventoryItemIndex, Weapon.WeaponOrder weaponOrder, int weaponIndex)
    {
        itemPanel.Initialize(itemResource, ItemPanel.ItemPanelType.WEAPON, inventoryItemIndex, weaponOrder, weaponIndex);

        itemPanel.SetUsed(_inventory.IsItemIndexInUsed(inventoryItemIndex));
        itemPanel.SetEquipped(_inventory.GetEquipItemIndex(weaponOrder, weaponIndex) == inventoryItemIndex);

        itemPanel.Show();

        itemPanel.Connect(nameof(ItemPanel.ItemPanelWeaponEquipClickSignal), this, nameof(_equipWeapon));
        itemPanel.Connect(nameof(ItemPanel.ItemPanelWeaponUnequipClickSignal), this, nameof(_unequipWeapon));
    }
예제 #3
0
    private void populatedStorePanel(ItemPanel itemPanel, ItemResource itemResource, int itemIndex)
    {
        itemPanel.Initialize(itemResource, ItemPanel.ItemPanelType.PURCHASE, itemIndex, Weapon.WeaponOrder.Right, -1);
        itemPanel.Show();

        itemPanel.Connect(nameof(ItemPanel.ItemPanelPurchaseClickSignal), this, nameof(_purchaseItem));
    }