Exemplo n.º 1
0
        public static ResourceStorage operator *(ResourceStorage r1, float rate)
        {
            ResourceStorage res = (ResourceStorage)r1.Clone();

            res.Multiply(rate);
            return(res);
        }
Exemplo n.º 2
0
        public static ResourceStorage operator +
            (ResourceStorage r1, ResourceStorage r2)
        {
            ResourceStorage res = (ResourceStorage)r1.Clone();

            res.Append(r2);
            return(res);
        }
Exemplo n.º 3
0
        void CalculateProduction()
        {
            OverallProduction.Clear();

            foreach (var area in Areas)
            {
                OverallProduction += area.Prototype.Production * area.Space;
            }
        }
Exemplo n.º 4
0
 public AreaPrototype(string name, Resource[] production)
 {
     Name       = name;
     Production = new ResourceStorage(production);
 }