public override GameObject OnTouch() { if (!isInInventory) { IInventoryItem inventoryItem = gameObject.GetComponent <IInventoryItem>(); if (inventoryItem != null) { Debug.Log($"I am {this.gameObject.name} and I should be in inventory"); OnItemClicked.Invoke(); systemTrigger.OnUse(); isInInventory = true; return(inventoryItem.AddToInventory()); } } return(this.gameObject); }
public void AddToInventory(UnitInventory inv) { m_item.AddToInventory(inv); }