public static ConsumableItem GetConsumableItem(ConsumableItemTypes consumableItemType) { return(consumableItemType switch { ConsumableItemTypes.Beer => new ConsumableItem(consumableItemType), ConsumableItemTypes.HealingPotion => new ConsumableItem(consumableItemType), _ => null });
public ConsumableItem(ConsumableItemTypes consumableItemType) { ConsumableItemType = consumableItemType; }