public void Equip(EquipmentItemExample item) { if (item.equipmentType == Category.Head) { if (head != null) { head.stats.RemoveAdjustment(stats); } head = item; if (head != null) { head.stats.ApplyAdjustment(stats); } } else if (item.equipmentType == Category.Armor) { if (armor != null) { armor.stats.RemoveAdjustment(stats); } armor = item; if (armor != null) { armor.stats.ApplyAdjustment(stats); } } }
public void Unequip(EquipmentItemExample item) { if (item.equipmentType == Category.Head && item == head) { if (head != null) { head.stats.RemoveAdjustment(stats); } head = null; } else if (item.equipmentType == Category.Armor && item == armor) { if (armor != null) { armor.stats.RemoveAdjustment(stats); } armor = null; } }