public float GetResourceAffilatedSum(CardType type, List <int> values) { int amountNeed = TaskRawDataParser.GetNeed(_taskObject, type); List <float> coeffs = TaskRawDataParser.GetCoefficients(_taskObject, type); float resource = 0f; if (amountNeed != 0 && values.Count != 0 && coeffs.Count == 0 && values.Count == coeffs.Count) { resource = values.Sum() >= amountNeed? TaskRawDataParser.AffilateResources(values, coeffs) : TaskRawDataParser.AffilateResourcesByDesc(values, coeffs, amountNeed); } return(resource); }
public Dictionary <CardType, int> GetNeed() { return(TaskRawDataParser.GetNeed(_taskObject)); }
public int GetNeed(CardType type) { return(TaskRawDataParser.GetNeed(_taskObject, type)); }