public void RemoveItem(string name) { items.Remove(dataInv.GetItemByName(name)); GameManager.runtimeInventory = items; GameManager.GetMenu("Inventory").transform.GetChild(0).GetComponent <InvSlots>().UpdateInventory(); GameManager.slotItem = null; SelectedSlotScript.EmptySlot(); }
// Use this for initialization //print (eventData.pointerDrag); void Start() { i = this; if (GameManager.slotItem == null) { GetComponent <Image>().enabled = false; return; } GetComponent <Image>().enabled = true; GetComponent <Image>().sprite = GameManager.slotItem.icon; }