public void Drop(ItemStack stack) { ItemContainer drop = Instantiate(ResourcesLoader.LoadPref("ItemContainer")).GetComponent <ItemContainer>(); drop.transform.position = transform.position; drop.SetItem(stack); }
private void AddStack(ItemStack stack) { Slot freeSlot = slots.FirstOrDefault(x => !x.isBlock); DragItem dragItem = Instantiate(ResourcesLoader.LoadPref("ItemIcon")).GetComponent <DragItem>(); dragItem.InitItem(stack); dragItem.SetSlot(freeSlot); }