public ItemEatData( IItem item, ICharacter character, PlayerCharacterCurrentStats currentStats, ItemFreshness freshness) { this.Item = item; this.Character = character; this.CurrentStats = currentStats; this.Freshness = freshness; }
/// <summary> /// Gets the food positive effects coefficient depending on the food freshness. /// </summary> public static float SharedGetFreshnessPositiveEffectsCoef(ItemFreshness freshness) { switch (freshness) { case ItemFreshness.Green: return(1.0f); case ItemFreshness.Yellow: return(0.7f); case ItemFreshness.Red: return(0.4f); default: throw new ArgumentOutOfRangeException(nameof(freshness), freshness, null); } }