Example #1
0
        private void CreateWapper(ItemCollectionSlotUI prefab, uint index)
        {
            var c = Instantiate <ItemCollectionSlotUI>(prefab);

            c.transform.SetParent(inventoryCollection.container);
            InventoryUtility.ResetTransform(c.transform);

            c.itemCollection = inventoryCollection;
            c.index          = index;
            inventoryCollection.items[index] = c;

            c.Repaint();
        }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     itemSlot = GetComponent <ItemCollectionSlotUI>();
 }
        private IEnumerator DestroyItem(ItemCollectionSlotUI inst)
        {
            yield return(destroyTimer);

            pool.Destroy(inst);
        }