public void unequipSlot(CharacterSlots slot) { GEquippableItem currentItem = slots [(int)slot]; foreach (KeyValuePair <CharacterSlots, string> entry in currentItem.resource_identifiers) { slots[(int)entry.Key] = null; } }
public void equipItem(GEquippableItem item) { foreach(KeyValuePair<CharacterSlots, string> entry in item.resource_identifiers) { if(slotContainsAnyItem(entry.Key)) { unequipSlot(entry.Key); } slots[(int)entry.Key] = item; } }
public void equipItem(GEquippableItem item) { foreach (KeyValuePair <CharacterSlots, string> entry in item.resource_identifiers) { if (slotContainsAnyItem(entry.Key)) { unequipSlot(entry.Key); } slots[(int)entry.Key] = item; } }