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; }
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(); }
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; }
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; }