/// <summary> /// Add an item to the given equip location. Do not attempt to equip to /// an incompatible slot. /// </summary> public void AddItem(EquipLocation slot, EquipableItem item) { Debug.Assert(item.GetAllowedEquipLocation() == slot); equippedItems[slot] = item; if (equipmentUpdated != null) { equipmentUpdated(); } }
/// <summary> /// Add an item to the given equip location. Do not attempt to equip to /// an incompatible slot. /// </summary> public void AddItem(EquipLocation slot, EquipableItem item) { Debug.Assert(item.CanEquip(slot, this)); equippedItems[slot] = item; if (equipmentUpdated != null) { equipmentUpdated(); } }