示例#1
0
 public BlockHelper(City city, LandUseType industrial, LandUseType commercial, LandUseType residential)
 {
     this.city     = city;
     newBlocks     = new List <Block>();
     changedBlocks = new List <Block>();
     globalNeeds   = new GlobalNeeds(city.globalIndustrial, city.globalResidential, city.globalCommercial);
     _industrial   = industrial;
     _commercial   = commercial;
     _residential  = residential;
 }
示例#2
0
 void ReplaceLUT(Block block, LandUseType newLUT)
 {
     block.lut = newLUT;
     //update building
     if (!block.historicalCenter)
     {
         block.ResetBlock();
     }
     else
     {
         block.UpdateBuilding();
     }
     //reset traffic
     ResetTraffic(block);
     //add to new blocks
     newBlocks.Add(block);
 }