Esempio n. 1
0
 public Barrack(int y, int x, int life) : base(y, x, life)
 {
     BuildCapabilities.Add(typeof(BuildBowWorkshopCapability), new BuildBowWorkshopCapability());
     BuildCapabilities.Add(typeof(UpgradeBarrackCapability), new UpgradeBarrackCapability());
     TrainCapabilities.Add(typeof(TrainSwordmanCapability), new TrainSwordmanCapability());
     progress = 10;
 }
Esempio n. 2
0
        private void AddBuilding(AbstractBuilding building)
        {
            Buildings.Add(building);
            Buildables.Add(building.Id, building);

            foreach (var capability in building.BuildCapabilities)
            {
                if (!BuildCapabilities.ContainsKey(capability.Key))
                {
                    BuildCapabilities.Add(capability.Key, capability.Value);
                }
            }

            foreach (var capability in building.TrainCapabilities)
            {
                if (!TrainCapabilities.ContainsKey(capability.Key))
                {
                    TrainCapabilities.Add(capability.Key, capability.Value);
                }
            }

            building.UnderConstructionEvent += Building_UnderConstructionEvent;
            building.StartBuilding();
        }
Esempio n. 3
0
 public Farm(int y, int x, int life) : base(y, x, life)
 {
     BuildCapabilities.Add(typeof(BuildBarrackCapability), new BuildBarrackCapability());
     TrainCapabilities.Add(typeof(TrainFarmerCapability), new TrainFarmerCapability());
     progress = 20;
 }
Esempio n. 4
0
 public BowWorkshop(int y, int x, int life) : base(y, x, life)
 {
     TrainCapabilities.Add(typeof(TrainBowmanCapability), new TrainBowmanCapability());
     BuildCapabilities.Add(typeof(UpgradeBowWorkshopCapability), new UpgradeBowWorkshopCapability());
     progress = 10;
 }