void Update() { if (!WTCGO && GameObject.FindGameObjectWithTag("WTC")) { WTCGO = GameObject.FindGameObjectWithTag("WTC"); wtc = (WTC)resources.buildings[WTCGO.GetComponent<IdManager>().buildingIndex]; } }
public string buildingFlavorText(string building) { if (building == "House") { House x = new House(); return x.flavorText; } else if (building == "Farm") { Farm x = new Farm(); return x.flavorText; } else if (building == "Factory") { Factory x = new Factory(); return x.flavorText; } else if (building == "Executive Building") { ExecutiveBuilding x = new ExecutiveBuilding(); return x.flavorText; } else if (building == "Educational Building") { EducationalBuilding x = new EducationalBuilding(); return x.flavorText; } else if (building == "Hospital") { Hospital x = new Hospital(); return x.flavorText; } else if (building == "Laboratory") { Laboratory x = new Laboratory(); return x.flavorText; } else if (building == "Police Station") { PoliceStation x = new PoliceStation(); return x.flavorText; } else if (building == "Workplace") { Workplace x = new Workplace(); return x.flavorText; } else if (building == "Public Space") { PublicSpace x = new PublicSpace(); return x.flavorText; } else if (building == "World Trade Center") { WTC x = new WTC(); return x.flavorText; } else if (building == "Military Outpost") { MilitaryOutpost x = new MilitaryOutpost(); return x.flavorText; } else if (building == "Food Territory") { FoodTerritory x = new FoodTerritory(); return x.flavorText; } else if (building == "Materials Territory") { MaterialsTerritory x = new MaterialsTerritory(); return x.flavorText; } else if (building == "Citizens Territory") { CitizensTerritory x = new CitizensTerritory(); return x.flavorText; } else return ""; }