示例#1
0
    public void AddItem(InventoryItem item)
    {
        UIInventoryItem uiItem = Instantiate(config.UIInventoryItemPrefab);

        uiItem.Init(item);
        items.Add(uiItem);
        uiItem.SetParent(inventoryItemParent);
    }
示例#2
0
 public void SelectUIItem(UIInventoryItem item)
 {
     if (selectedItem != null)
     {
         selectedItem.SetParent(inventoryItemParent);
     }
     item.SetParent(currentItemParent);
     selectedItem = item;
 }