private Building CreateBuildingEntity(BuildingInfo buildingInfo)
    {
        switch (buildingInfo.Id)
        {
        case "Barracks":
            return(new Barracks(_armyUnitsInfos, _world, this));

        case "StockpileBlock":
        case "Barn":
        case "Armory":
            var stockpile = new StockpileBlock(_world, GetStorageInfo(buildingInfo));
            _world.Stockpile.AddStockpileBlock(stockpile);
            return(stockpile);

        case "Cityhouse":
            return(new CityHouse(_world));

        default:
            return(new Workplace(_world));
        }
    }
Beispiel #2
0
 public void PutResourcesToStockpile(StockpileBlock stockpileBlock)
 {
     stockpileBlock.ChangeResource(ActiveProductionCycle.OutputResource.Id,
                                   ActiveProductionCycle.OutputResourceQuantity);
 }
Beispiel #3
0
 public void AddStockpileBlock(StockpileBlock stockpileBlock)
 {
     _stockpileBlocks.Add(stockpileBlock);
 }