///////////////////// /// Constructors /// //////////////////// public Citizen(string name, int money, float healthValue, float happinessValue, CityPart.PLACE livingPlace, ENVIROMENTAL_COMMITMENT envCommitment, City city) { this.enviromentalCommitment = envCommitment; this.city = city; ID = idCount++; this.name = name; this.money = money; Health = new DependentIndex("Salud", "Salud de " + name, healthValue); Happiness = new DependentIndex("Felicidad", "Felicidad de " + name, happinessValue); LivingPlace = livingPlace; acceptedJob = new IndustrySector.AcceptedJob(new Coords(), Job.TYPE.NONE, 0, 0, 0, 999, CityPart.PLACE.CENTER); ResetDailySchedule(); }
////////////////////// // Auxiliar Methods // ////////////////////// void SetInitialValues(TYPE transportType, float safetyValue, float wearValue, int capacity, float maxSpeed, float speedIndexValue, float pollutingValue, EXPANSION expansion, ENHANCEMENTS enhancements, CityPart.PLACE cityPlace) { CityPlace = cityPlace; this.expansion = expansion; this.enhancements = enhancements; TransportType = transportType; Safety = new DependentIndex("Seguridad", "Representa como de seguro es desplazarse por " + Global.Names.transport[(int)transportType] + " en el barrio " + Global.Names.cityPart[(int)cityPlace], safetyValue); Polluting = new DependentIndex("Contaminante", "Representa como de contaminante es despalzarse por " + Global.Names.transport[(int)transportType] + " en el barrio " + Global.Names.cityPart[(int)cityPlace], pollutingValue); Wear = new DependentIndex("Desgaste", "Representa como de desgastado está el transporte por " + Global.Names.transport[(int)transportType] + " en el barrio " + Global.Names.cityPart[(int)cityPlace], wearValue); Capacity = capacity; Speed = maxSpeed; SpeedIndex = new DependentIndex("Velocidad", "Representa que cantidad de la velocidad máxima es alcanzable viajando por " + Global.Names.transport[(int)transportType] + " en el barrio " + Global.Names.cityPart[(int)cityPlace], speedIndexValue); }