public virtual void UnattachSlot() { _subscribedSlot.IsActive = false; _subscribedSlot.OnChange -= UpdateComponent; _subscribedSlot.Unequip(); _subscribedSlot = null; _subscribedSlotIsNull = true; _isSunscribed = false; }
public virtual bool AttachSlot(IEquipmentSlot slot) { if (_isSunscribed) { return(false); } _subscribedSlot = slot; _subscribedSlotIsNull = false; _subscribedSlot.Equip(_description); _subscribedSlot.OnChange += UpdateComponent; _subscribedSlot.IsActive = true; _isSunscribed = true; return(true); }
public static bool HasItemEquipped(this IEquipmentSlot <IItem> slot) { return(slot.SlottedItem != null); }