示例#1
0
    private void DisplayAllItems()
    {
        Vector2 size = InventorySize;

        ItemDisplayer.Fill(R, slotPrefab, uiMask.transform, items, slots,
                           INVENTORY_SLOT_SIZE, INVENTORY_SLOT_SPACE, ClickEvent, HoverEvent, HoverExitEvent);
    }
示例#2
0
    private void UpdateTrade()
    {
        ///show player items
        ItemDisplayer.Fill(
            playerUI.rect,
            slotPrefab,
            playerUI.transform,
            playerInv.items,
            playerSlot,
            UiInventory.INVENTORY_SLOT_SIZE,
            UiInventory.INVENTORY_SLOT_SPACE,
            OnClickPlayerItem,
            (i) => i.RuntimeRef.canBeSoled);

        ///show npc items
        ItemDisplayer.Fill(
            npcUI.rect,
            slotPrefab,
            npcUI.transform,
            npcInv.items,
            npcSlot,
            UiInventory.INVENTORY_SLOT_SIZE,
            UiInventory.INVENTORY_SLOT_SPACE,
            OnClickNpcItem
            );

        ///show player trading items
        ItemDisplayer.Fill(
            playerTradeUI.rect,
            slotPrefab,
            playerTradeUI.transform,
            playerTradingItems,
            playerTradeSlot,
            UiInventory.INVENTORY_SLOT_SIZE,
            UiInventory.INVENTORY_SLOT_SPACE,
            OnClickPlayerTradingItem
            );

        ///show npc trading items
        ItemDisplayer.Fill(
            npcTradeUI.rect,
            slotPrefab,
            npcTradeUI.transform,
            npcTradingItems,
            npcTradeSlot,
            UiInventory.INVENTORY_SLOT_SIZE,
            UiInventory.INVENTORY_SLOT_SPACE,
            OnClickNpcTradingItem
            );
    }