// Update is called once per frame public void DestroyObject() { if (Item.ItemType.ToString() == "Potion") { Item.GetAction(); Destroy(gameObject); } }