void SetItem2(BaseBrainItem i) { RemoveItem2(); var c = Instantiate <BaseBrainItem> (i, Item2Slot); i.CopyTo(c); Item2 = c; Item2Slot.GetComponent <Button> ().enabled = true; }
public void RemoveItem2() { if (!Item2) { return; } Destroy(Item2.gameObject); Item2 = null; Item2Slot.GetComponent <Button> ().enabled = false; Refresh(); }