コード例 #1
0
        internal Building(string name, BuildingType atype, BuildingRole arole)
        {
            Name = name;
            type = atype;
            role = arole;
            switch (arole)
            {
            case BuildingRole.Production:
                availableProducts = new ObjectInventory <string, int>();
                Ready             = DateTime.UtcNow;
                break;

            case BuildingRole.Stats:
                stats = new SandBoxStats();
                break;
            }
        }
コード例 #2
0
 internal void Remove(SandBoxStats stats)
 {
     MaximumPopulation -= stats.MaximumPopulation;
     StorageSpace      -= stats.StorageSpace;
     Defenses          -= stats.Defenses;
 }
コード例 #3
0
 internal void Add(SandBoxStats stats)
 {
     MaximumPopulation += stats.MaximumPopulation;
     StorageSpace      += stats.StorageSpace;
     Defenses          += stats.Defenses;
 }