public static ResourceStorage operator *(ResourceStorage r1, float rate) { ResourceStorage res = (ResourceStorage)r1.Clone(); res.Multiply(rate); return(res); }
public static ResourceStorage operator + (ResourceStorage r1, ResourceStorage r2) { ResourceStorage res = (ResourceStorage)r1.Clone(); res.Append(r2); return(res); }
void CalculateProduction() { OverallProduction.Clear(); foreach (var area in Areas) { OverallProduction += area.Prototype.Production * area.Space; } }
public AreaPrototype(string name, Resource[] production) { Name = name; Production = new ResourceStorage(production); }