////////////////// // Constructors // ////////////////// public TransportSector(float technologyValue, float investmentValue, CityPart.PLACE cityPlace) { CityPlace = cityPlace; Technology = new ConditionableIndex("Tecnología", "Nivel de la tecnología de los transportes en el barrio " + Global.Names.cityPart[(int)cityPlace], technologyValue); Investment = new ConditionableIndex("Inversión", "Nivel de inversión dirigida a los transportes en el barrio " + Global.Names.cityPart[(int)cityPlace], investmentValue); SectorPollution = new RepresentativeIndex("Contaminación del sector", "Nivel de contaminación producida por los transportes en el barrio " + Global.Names.cityPart[(int)cityPlace], 0.5f); transportsCount = Enum.GetNames(typeof(Transport.TYPE)).Length; Transports = new Transport[transportsCount]; freeSpaces = new int[transportsCount]; Transports[(int)Transport.TYPE.ROAD] = new Transport(Transport.TYPE.ROAD, Transport.EXPANSION.NONE, Transport.ENHANCEMENTS.NONE, cityPlace); Transports[(int)Transport.TYPE.SUBWAY] = new Transport(Transport.TYPE.SUBWAY, Transport.EXPANSION.NONE, Transport.ENHANCEMENTS.NONE, cityPlace); Transports[(int)Transport.TYPE.CYCLE_LANE] = new Transport(Transport.TYPE.CYCLE_LANE, Transport.EXPANSION.NONE, Transport.ENHANCEMENTS.NONE, cityPlace); Transports[(int)Transport.TYPE.STREET] = new Transport(Transport.TYPE.STREET, Transport.EXPANSION.NONE, Transport.ENHANCEMENTS.NONE, cityPlace); ResetFreeSpaces(); }
////////////////// // Constructors // ////////////////// public CityPart(PLACE cityPlace, POPULATION population, Citizen.ECONOMIC_CLASS populationWealth, INDUSTRY industry, SECTOR_INVESTMENT industryInvestment, FUN fun, SECTOR_INVESTMENT leisureInvestment, INFRASTRUCTURE infrastructure, SECTOR_INVESTMENT transportInvestment, City city) { this.city = city; CityPlace = cityPlace; Citizens = new Dictionary <int, Citizen>(); nonAllocatedHomes = new List <Coords>(); cityHomesGrid = new int[32, 32]; GlobalHappiness = new RepresentativeIndex("Felicidad Global", "Felicidad Global en el barrio " + CityPlace, 0.5f); GlobalHealth = new RepresentativeIndex("Salud Global", "Salud Global en el barrio " + CityPlace, 0.5f); LowClassProportion = new RepresentativeIndex("Clase Baja", "Proporción de ciudadanos de clase baja en el barrio " + CityPlace, 0.5f); MiddleClassProportion = new RepresentativeIndex("Clase Media", "Proporción de ciudadanos de clase media en el barrio " + CityPlace, 0.5f); HighClassProportion = new RepresentativeIndex("Clase Alta", "Proporción de ciudadanos de clase alta en el barrio " + CityPlace, 0.5f); InitLaboralSector(industry, industryInvestment); InitTransportSector(infrastructure, transportInvestment); InitLeisureSector(fun, leisureInvestment); InitPopulation(population, populationWealth); // It has to be the last initialization //ProcessDay(); }