public float GetPrice(Good g) { Good found = products.Single <Good>(x => x == g); if (found == null) { return(1); } else { float basePrice = found.GetBasePrice(); return(found.GetBasePrice() + Random.Range(0, basePrice * .4f)); } }
public float GetPrice(Good good) { float supplyMultiplier = GetSupplyMultipler(goodsToSupply[good.type]); float heatMultiplier = good.GetHeatMultiplier(); return((supplyMultiplier + heatMultiplier) * good.GetBasePrice()); }