private float DifficultyToProduce(ProductionDifficulty difficultyToProduce) { float productionDifficultyModifier = 0; switch (difficultyToProduce) { case ProductionDifficulty.trivial: productionDifficultyModifier = _trivialToProduce; break; case ProductionDifficulty.easy: productionDifficultyModifier = _easyToProduce; break; case ProductionDifficulty.medium: productionDifficultyModifier = _mediumToProduce; break; case ProductionDifficulty.hard: productionDifficultyModifier = _hardToProduce; break; } return(productionDifficultyModifier); }
public Resource(int id, string displayName, ResourceUtil.ResourceType type, float basePrice, AgentEntity.EntityType producedBy, ProductionDifficulty difficultyToProduce) { Id = id; DisplayName = displayName; Type = type; BasePrice = basePrice; ProducedBy = producedBy; ProductionDifficultyModifier = DifficultyToProduce(difficultyToProduce); }