public void EquipItemEvent(short slotNo) {//This must be called after the item is finally set. ObjectInteraction objInt = GetObjectIntAtSlot(slotNo); if (objInt != null) { objInt.Equip(slotNo); } }
public void EquipItemEvent(short slotNo) { //This must be called after the item is finally set. GameObject obj = GetGameObjectAtSlot(slotNo); if (obj != null) { ObjectInteraction objInt = obj.GetComponent <ObjectInteraction>(); if (objInt != null) { objInt.Equip(slotNo); } } }