Esempio n. 1
0
    private CityObject CreateCityObjectFromProjectData(ProjectData projectData, CityObject cityObjectParent)
    {
        var prefab = FindPrefab(projectData.type);

        if (!prefab)
        {
            return(null);
        }

        CityObject rootCityObject = new CityObject(prefab, cityObjectParent, projectData.width, projectData.height, projectData.value);

        ScaleObject(rootCityObject);

        /* * *
         * If an object has one or more children, then the children should execute this method on their own.
         */

        if (projectData.children.Count() != 0)
        {
            foreach (ProjectData data in projectData.children)
            {
                CityObject newChild = CreateGameObjectFromProjectData(data, rootCityObject);
                rootCityObject.AppendChild(newChild);
            }
        }
        return(rootCityObject);
    }
Esempio n. 2
0
    public void SetValue(CityObject node)
    {
        Material valMaterial;

        switch (node.value)
        {
        case 1: valMaterial = value1; break;

        case 2: valMaterial = value2; break;

        case 3: valMaterial = value3; break;

        case 4: valMaterial = value4; break;

        case 5: valMaterial = value5; break;

        case 6: valMaterial = value6; break;

        case 7: valMaterial = value7; break;

        case 8: valMaterial = value8; break;

        case 9: valMaterial = value9; break;

        default: valMaterial = valueDefault; break;
        }
        node.form.GetComponent <Renderer>().material = valMaterial;
    }
Esempio n. 3
0
        private GenericValidator ValidateCity(CityObject city)
        {
            var gVal = new GenericValidator();

            if (city == null)
            {
                gVal.Code  = -1;
                gVal.Error = message_Feedback.Fatal_Error;
                return(gVal);
            }
            if (string.IsNullOrEmpty(city.Name))
            {
                gVal.Code  = -1;
                gVal.Error = message_Feedback.City_Name_Error;
                return(gVal);
            }

            if (city.StateId < 1)
            {
                gVal.Code  = -1;
                gVal.Error = message_Feedback.State_Selection_Error;
                return(gVal);
            }

            gVal.Code = 5;
            return(gVal);
        }
Esempio n. 4
0
 public long AddCity(CityObject city)
 {
     try
     {
         if (city == null)
         {
             return(-2);
         }
         var duplicates = _repository.Count(m => m.Name.Trim().ToLower().Equals(city.Name.Trim().ToLower()) && city.StateId.Equals(m.StateId));
         if (duplicates > 0)
         {
             return(-3);
         }
         var cityEntity = ModelCrossMapper.Map <CityObject, City>(city);
         if (cityEntity == null || string.IsNullOrEmpty(cityEntity.Name))
         {
             return(-2);
         }
         var returnStatus = _repository.Add(cityEntity);
         _uoWork.SaveChanges();
         return(returnStatus.CityId);
     }
     catch (Exception ex)
     {
         ErrorLogger.LogError(ex.StackTrace, ex.Source, ex.Message);
         return(0);
     }
 }
Esempio n. 5
0
 public int UpdateCity(CityObject city)
 {
     try
     {
         if (city == null)
         {
             return(-2);
         }
         var duplicates = _repository.Count(m => m.Name.Trim().ToLower().Equals(city.Name.Trim().ToLower()) && city.StateId.Equals(m.StateId) && (m.CityId != city.CityId));
         if (duplicates > 0)
         {
             return(-3);
         }
         var cityEntity = ModelCrossMapper.Map <CityObject, City>(city);
         if (cityEntity == null || cityEntity.CityId < 1)
         {
             return(-2);
         }
         _repository.Update(cityEntity);
         _uoWork.SaveChanges();
         return(5);
     }
     catch (Exception ex)
     {
         ErrorLogger.LogError(ex.StackTrace, ex.Source, ex.Message);
         return(-2);
     }
 }
Esempio n. 6
0
    /* * *
     * This function walks trough the whole tree and deletes the objects from the bottom to the top
     */

    public void DestroyBuiltCity(CityObject node)
    {
        foreach (CityObject child in node.children)
        {
            DestroyBuiltCity(child);
        }
        node.DestroyCityObject();
    }
Esempio n. 7
0
	public void SyncCity(City squareDictionaryCity, GameObject objectInScene){

		CityObject cityInScene = objectInScene.GetComponent<CityObject> ();
		cityInScene.baseDefence = squareDictionaryCity.baseDefence;
		cityInScene.coords = squareDictionaryCity.coords;
		cityInScene.occupiedBy = squareDictionaryCity.occupiedBy;
		cityInScene.replenishRatePerTurn = squareDictionaryCity.replenishRatePerTurn;
	}
Esempio n. 8
0
    private void PositionObjectsRadial(CityObject node)
    {
        LayoutVar variables = new LayoutVar();

        Debug.Log("Size: " + GetArraySize(node));
        variables.size       = GetArraySize(node);
        GameObject[,] layout = new GameObject[variables.size, variables.size];
        distance             = distance * 1.3 / node.width;

        foreach (CityObject child in node.children)
        {
            layout[variables.z, variables.x] = child.form;
            Debug.Log(variables.x + " und " + variables.z);
            float xPos;
            float zPos;

            if (variables.x == 0 && variables.z == 0)
            {
                xPos = 1 - child.form.transform.localScale.x - (float)distance;
                zPos = 1 - child.form.transform.localScale.z - (float)distance;
            }
            else if (variables.x == 0 && variables.z != 0)
            {
                xPos = 1 - child.form.transform.localScale.x - (float)distance;
                zPos = layout[variables.z - 1, variables.x].transform.position.z
                       - layout[variables.z - 1, variables.x].transform.localScale.z
                       - child.form.transform.localScale.z
                       - (float)distance * 2f;
            }
            else if (variables.x != 0 && variables.z == 0)
            {
                xPos = layout[variables.z, variables.x - 1].transform.position.x
                       - layout[variables.z, variables.x - 1].transform.localScale.x
                       - child.form.transform.localScale.x
                       - (float)distance * 2f;
                zPos = 1 - child.form.transform.localScale.z - (float)distance;
            }
            else
            {
                xPos = layout[variables.z - 1, variables.x].transform.position.x - (float)distance * 2f;

                zPos = layout[variables.z, variables.x - 1].transform.position.z - (float)distance * 2f;
            }

            float yPos = 1.025f + (0.5f * child.height / 100) + (node.form.transform.localScale.y);

            child.form.transform.position = new Vector3(xPos, yPos, zPos);

            if (IsScope(child))
            {
                float planeHeight = plane.transform.localScale.y / 2;
                child.form.transform.position += new Vector3(0, planeHeight, 0);
                PositionChildrenRadial(child);
            }

            LayoutManager(variables);
        }
    }
Esempio n. 9
0
 /* * *
  * This Method adjusts the widths of the planes because they didn´t get a width of the ProjectData before.
  * So the Planes add up all widths of their children (cubes) for theirown.
  */
 private double Subtree(CityObject cityObject)
 {
     foreach (CityObject child in cityObject.children)
     {
         cityObject.width += Subtree(child) + 2 * distance;
         Debug.Log(cityObject.width);
     }
     return(cityObject.width);
 }
Esempio n. 10
0
 public CityObject(GameObject prefab, CityObject cityObjectParent, double newWidth, int newHeight, int newValue)
 {
     form     = Instantiate(prefab);
     parent   = cityObjectParent;
     children = new List <CityObject>();
     width    = newWidth;
     height   = newHeight;
     value    = newValue;
 }
Esempio n. 11
0
        public ActionResult EditCity(CityObject city)
        {
            var gVal = new GenericValidator();

            try
            {
                if (ModelState.IsValid)
                {
                    var valStatus = ValidateCity(city);
                    if (valStatus.Code < 1)
                    {
                        gVal.Code  = 0;
                        gVal.Error = valStatus.Error;
                        return(Json(gVal, JsonRequestBehavior.AllowGet));
                    }

                    if (Session["_city"] == null)
                    {
                        gVal.Code  = -1;
                        gVal.Error = message_Feedback.Session_Time_Out;
                        return(Json(gVal, JsonRequestBehavior.AllowGet));
                    }

                    var oldCity = Session["_city"] as CityObject;
                    if (oldCity == null || oldCity.CityId < 1)
                    {
                        gVal.Code  = -5;
                        gVal.Error = message_Feedback.Session_Time_Out;
                        return(Json(gVal, JsonRequestBehavior.AllowGet));
                    }
                    oldCity.Name    = city.Name.Trim();
                    oldCity.StateId = city.StateId;
                    var k = new CityServices().UpdateCity(oldCity);
                    if (k < 1)
                    {
                        gVal.Error = k == -3 ? message_Feedback.Item_Duplicate : message_Feedback.Update_Failure;
                        gVal.Code  = 0;
                        return(Json(gVal, JsonRequestBehavior.AllowGet));
                    }

                    gVal.Code  = 5;
                    gVal.Error = message_Feedback.Update_Success;
                    return(Json(gVal, JsonRequestBehavior.AllowGet));
                }

                gVal.Code  = -5;
                gVal.Error = message_Feedback.Process_Failed;
                return(Json(gVal, JsonRequestBehavior.AllowGet));
            }
            catch
            {
                gVal.Code  = -1;
                gVal.Error = message_Feedback.Process_Failed;
                return(Json(gVal, JsonRequestBehavior.AllowGet));
            }
        }
Esempio n. 12
0
    /* * *
     * For positioning the Objects radial, a Scope needs to be split into a n*n Matrix. This Function finds the next
     * biggest square number n^2 and returns n for knowledge about the needed matrix size.
     */

    private int GetArraySize(CityObject node)
    {
        int size = 0;;

        while ((size * size) < node.children.Count)
        {
            size++;
        }
        return(size);
    }
 //---- Protected Methods ----/
 protected override bool IsInteractable(CityObject cityObject) {
     if (cityObject == null) { return false; }
     Clickable clickable = cityObject.GetComponent<Clickable>();
     if (clickable != null) {
         if (!clickable.enabled) { return false; }
     }
     if (cityObject is Waypoint) { return false; }
     if (cityObject is Cloak) { return false; }
     return true;
 }
Esempio n. 14
0
    /* * *
     * This function sets the material for every created GameObject
     */

    private void SetMaterials(CityObject node)
    {
        foreach (CityObject child in node.children)
        {
            valueManager.SetValue(child);
            if (IsScope(child))
            {
                SetMaterials(child);
            }
        }
    }
Esempio n. 15
0
    /* * *
     * This Method checks if a CityObject has children. If it has children, the function knows that the Object is
     * a Scope and returns true. Else it just returns false because only Leafs of the tree haven´t got children.
     */

    private bool IsScope(CityObject cityObject)
    {
        if (cityObject.children.Count != 0)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
Esempio n. 16
0
    /* * *
     * This function sorts all children of a cityobject in descending order
     */

    private void SortChildren(CityObject node)
    {
        node.children = node.children.OrderByDescending(x => x.width).ToList();
        foreach (CityObject child in node.children)
        {
            if (IsScope(child))
            {
                SortChildren(child);
            }
        }
    }
Esempio n. 17
0
 public long AddCity(CityObject cityAccount)
 {
     try
     {
         return(_cityRepository.AddCity(cityAccount));
     }
     catch (Exception ex)
     {
         ErrorLogger.LogError(ex.StackTrace, ex.Source, ex.Message);
         return(0);
     }
 }
Esempio n. 18
0
 public int UpdateCity(CityObject city)
 {
     try
     {
         return(_cityRepository.UpdateCity(city));
     }
     catch (Exception ex)
     {
         ErrorLogger.LogError(ex.StackTrace, ex.Source, ex.Message);
         return(-2);
     }
 }
Esempio n. 19
0
        public IActionResult Cities()
        {
            var obj = new CityObject()
            {
                firstCity  = CityObject[new Random().Next(CityObject.Length)],
                secondCity = CityObject[new Random().Next(CityObject.Length)],
                thirdCity  = CityObject[new Random().Next(CityObject.Length)],
                forthCity  = CityObject[new Random().Next(CityObject.Length)],
                fifthCity  = CityObject[new Random().Next(CityObject.Length)]
            };

            return(Ok(obj));
        }
Esempio n. 20
0
        internal List<CityObject> getObjects(string list)
        {
            List<CityObject> b = new List<CityObject>();

            IDataReader reader = executeSelect("select name from " + list + "");
            
            while (reader.Read())
            {
                CityObject tmp = new CityObject(reader["name"].ToString());
                b.Add(tmp);
            }
            return b;
        }
Esempio n. 21
0
    /* * *
     * Scopes and leafs need a different way to scale their heights and this function is doing it.
     * The size of the scopes should be all the same while the leaf objects get heights relativ to it´s height-value.
     */

    private float ScaleHeights(CityObject node)
    {
        float height;

        if (IsScope(node))
        {
            height = 1f;
        }
        else
        {
            height = (float)(1 / plane.transform.localScale.y) * node.height / 100; //40 = 1 / 0.01 (= height of the first scope)
        }

        return(height);
    }
Esempio n. 22
0
        public void Init(CityObject city, Player player)
        {
            playerInspecting = player;
            cityObject       = city;

            nameTxt.text = player.Name;
            if (player == Player.LocalPlayer)
            {
                nameTxt.text += "(You)";
            }
            climateTxt.text = playerInspecting.ClimateType.ToString();
            setTradeOffersBtn.gameObject.SetActive(player == Player.LocalPlayer);
            gameObject.SetActive(true);
            pollutionPerMinuteTxt.text = string.Format("{0:0}", player.PlayerPollutionPerYear);
            InstantiateTradeOffers();
        }
 //---- Protected Methods ----/
 protected override bool IsInteractable(CityObject cityObject) {
     if (cityObject == null) { return false; }
     Clickable clickable = cityObject.GetComponent<Clickable>();
     if (clickable != null) {
         if (!clickable.enabled) { return false; }
     } 
     bool isPowerStation = cityObject is PowerStation;
     bool isApp = cityObject is App;
     bool isIOBuilding = cityObject is IOBuilding;
     bool isConnection = cityObject is Connection;
     bool isOrchestrator = cityObject is Orchestrator;
     bool isTransporterStation = cityObject is TransporterStation;
     bool isLion = cityObject is CityLion;
     bool isTerminal = cityObject is ClientTerminal;
     return isPowerStation || isApp || isIOBuilding || isLion || isTerminal || isConnection || isOrchestrator || isTransporterStation;
 }
Esempio n. 24
0
    public IEnumerator BuildCodeCity(JsonProject JsonProjectToBuild)
    {
        Debug.Log(JsonProjectToBuild.views[0].href);
        WWW complexityUrl = new WWW(JsonProjectToBuild.views[0].href);

        yield return(complexityUrl);

        if (complexityUrl.error != null)
        {
            Debug.Log("ERROR: " + complexityUrl.error);
        }
        else
        {
            ProjectView projectView = ProcessProjectData(complexityUrl.text);
            origin = CreateGameObjectFromProjectData(projectView.data[0], origin);
            Algorithm();
        }
    }
Esempio n. 25
0
    private void ScaleObject(CityObject node)
    {
        double maxWidth = node.width;

        foreach (CityObject child in node.children)
        {
            float scaleRatio = (float)(child.width * 1.3 / maxWidth);

            if (scaleRatio > 1)
            {
                scaleRatio = (float)(child.width / maxWidth);
            }

            float height = ScaleHeights(child);
            child.form.transform.localScale = new Vector3(scaleRatio, height, scaleRatio);
            if (child.children.Count() != null)
            {
                ScaleObject(child);
            }
        }
    }
Esempio n. 26
0
        public ActionResult AddCity(CityObject city)
        {
            var gVal = new GenericValidator();

            try
            {
                if (ModelState.IsValid)
                {
                    var valStatus = ValidateCity(city);
                    if (valStatus.Code < 1)
                    {
                        gVal.Code  = 0;
                        gVal.Error = valStatus.Error;
                        return(Json(gVal, JsonRequestBehavior.AllowGet));
                    }

                    var k = new CityServices().AddCity(city);
                    if (k < 1)
                    {
                        gVal.Error = k == -3 ? message_Feedback.Item_Duplicate : message_Feedback.Insertion_Failure;
                        gVal.Code  = 0;
                        return(Json(gVal, JsonRequestBehavior.AllowGet));
                    }
                    gVal.Code  = k;
                    gVal.Error = message_Feedback.Insertion_Success;
                    return(Json(gVal, JsonRequestBehavior.AllowGet));
                }

                gVal.Code  = -1;
                gVal.Error = message_Feedback.Model_State_Error;
                return(Json(gVal, JsonRequestBehavior.AllowGet));
            }
            catch
            {
                gVal.Code  = -1;
                gVal.Error = message_Feedback.Process_Failed;
                return(Json(gVal, JsonRequestBehavior.AllowGet));
            }
        }
Esempio n. 27
0
    /* * *
     * This function sets all creted objects in a line on one side of the table using its whole width.
     */

    private void PositionObjectsLine(CityObject node)
    {
        float usedSpace = 0;
        float middle    = node.form.transform.localScale.x / 2;

        //SortChildren(node);
        foreach (CityObject child in node.children)
        {
            float xPos = 1 - child.form.transform.localScale.x;
            //Debug.Log(xPos);
            float yPos = 1.025f + (0.5f * child.height / 100) + (node.form.transform.localScale.y); //0.025 is the top of the table
            float zPos = 1 - (usedSpace * 2) - child.form.transform.localScale.z;
            usedSpace += child.form.transform.localScale.z;
            child.form.transform.position = new Vector3(xPos, yPos, zPos);

            if (IsScope(child))
            {
                float planeHeight = plane.transform.localScale.y / 2;
                child.form.transform.position += new Vector3(0, planeHeight, 0);
                PositionChildrenLine(child);
            }
        }
    }
Esempio n. 28
0
    IEnumerator RequestWeather()
    {
        /*if (System.IO.File.Exists(Application.persistentDataPath + "/request.txt"))
         * {
         *  System.IO.FileInfo info = new System.IO.FileInfo(Application.persistentDataPath + "/request.txt");
         *  int time = int.Parse(DateTimeToStamp( info.CreationTimeUtc ))- int.Parse(DateTimeToStamp(System.DateTime.Now));
         *  if (time < 3600 * 6)
         *  {
         *      WeatherObject Weather = JsonConvert.DeserializeObject<WeatherObject>(System.IO.File.ReadAllText(Application.persistentDataPath + "/request.txt"));
         *      OnWeatherInit(Weather.data.Today, city.data.city);
         *
         *  }
         * }*/
        UnityWebRequest ipRequest = UnityWebRequest.Get("http://pv.sohu.com/cityjson?ie=utf-8");

        yield return(ipRequest.SendWebRequest());

        IPObject        ip          = JsonConvert.DeserializeObject <IPObject>(ipRequest.downloadHandler.text.Replace("var returnCitySN = ", "").Replace(";", ""));
        UnityWebRequest cityRequest = UnityWebRequest.Get("http://ip.taobao.com/service/getIpInfo.php?ip=" + ip.cip);

        yield return(cityRequest.SendWebRequest());

        CityObject      city           = JsonConvert.DeserializeObject <CityObject>(cityRequest.downloadHandler.text);
        UnityWebRequest weatherRequest = UnityWebRequest.Get("http://wthrcdn.etouch.cn/weather_mini?citykey=" + CityCode(city.data.city));

        weatherRequest.SetRequestHeader("Content-Type", "application/octet-stream");
        weatherRequest.SetRequestHeader("Content-Encoding", "gzip");
        yield return(weatherRequest.SendWebRequest());

        System.IO.File.WriteAllBytes(Application.persistentDataPath + "/request.zip", weatherRequest.downloadHandler.data);
        System.IO.FileStream inStream  = new System.IO.FileStream(Application.persistentDataPath + "/request.zip", System.IO.FileMode.Open);
        System.IO.FileStream outStream = new System.IO.FileStream(Application.persistentDataPath + "/request.txt", System.IO.FileMode.Create);
        GZip.Decompress(inStream, outStream, true);
        WeatherObject Weather = JsonConvert.DeserializeObject <WeatherObject>(System.IO.File.ReadAllText(Application.persistentDataPath + "/request.txt"));

        OnWeatherInit(Weather.data.Today, city.data.city);
    }
Esempio n. 29
0
    void BuildBuilding(GridTile tile)
    {
        // Pick a type of building randomly
        CityObject buildObject = buildings[rand.Next(0, buildings.Length)];


        float diameter = buildObject.prefabs[0].GetComponent <SizeController>().diameter;

        // Rotation quaternion for the building orientation
        Quaternion rotation;

        // List of possible orientations
        float[] possibleOrientations = { 0, 90, 180, 270 };

        // Get an angle from the possible orientation
        float angle = possibleOrientations[rand.Next(0, possibleOrientations.Length)];

        // Make a maximum of 10 degrees offset from the cardinal direction (purely for making it more visibly appealing)
        //angle += (float)rand.NextDouble() * 10;

        // Create the rotation quaternion
        rotation = Quaternion.AngleAxis(angle, Vector3.up);
        if (world.CanBuild(tile.position, diameter, buildObject.prefabs[0], buildObject.scale, rotation, true))
        {
            GameObject parentObj = new GameObject();
            parentObj.transform.parent = transform;
            CityBuildingManager parentController = parentObj.AddComponent <CityBuildingManager>();
            parentController.cityObject = buildObject;
            // Place the building
            GameObject cityObj = world.AddOther(buildObject.prefabs[0], tile.position + Vector3.down * 0.1f, rotation, buildObject.scale, GridTileOccupant.OccupantType.City, parentObj.transform);
            parentController.curObject = cityObj;

            curBuildings.Add(parentController);

            currentPlacedHouses++;
        }
    }
Esempio n. 30
0
    // Use this for initialization
    void Start()
    {
        string[] cityMapL = System.IO.File.ReadAllText("Assets/map2.csv").Split(new char[] { ';', '\n' });
        //cityMapL.
        for (int i = 0; i < cityMapL.Length; i++)
        {
            Debug.Log(i + " " + cityMapL[i]);
        }
        cityMap = new CityObject[cityMapL.Length];
        for (int i = 0; i < cityMapL.Length - 1; i++)
        {
            cityMap[i] = (CityObject)Enum.Parse(typeof(CityObject), cityMapL[i]);
        }

        for (int i = 0; i < mapHeight * mapWidth; i++)
        {
            CityObject cityObj = cityMap[i];
            int        x       = i % mapWidth;
            int        y       = i / mapWidth;
            GameObject obj;
            switch (cityObj)
            {
            case CityObject.R:
                obj = roads[(int)getRoadType(x, y)];
                break;

            case CityObject.N:
                obj = nature[UnityEngine.Random.Range(0, nature.Length)];
                break;

            default:
                obj = houses[UnityEngine.Random.Range(0, houses.Length)];
                break;
            }
            Instantiate(obj, new Vector3(-x * 20 - 10, 0, y * 20 + 20) + obj.transform.position, obj.transform.rotation);
        }
    }
Esempio n. 31
0
    /* * *
     * Due to the way unity is calculating with its scaling of the parents etc. - this function is needed to position all objects
     * beyond the second levelin the tree of all Objects.
     */

    private void PositionChildrenLine(CityObject node)
    {
        float usedSpace = 0;
        float middle    = node.form.transform.localScale.x / 2;

        foreach (CityObject child in node.children)
        {
            float xPos = 1 - (child.form.transform.localScale.x * node.form.transform.localScale.x); //passt

            float yPos = 1.035f + (0.5f * child.height / 100) + node.form.transform.lossyScale.y;
            //1.035 => 1.03 is the yPos of the first Plane + 0.005 for the plane
            //1.03 => 1.025 is the top of the table + 0.005 for the first plane

            float zPos = (node.form.transform.position.z + node.form.transform.localScale.z) -
                         ((child.form.transform.localScale.z + usedSpace) * node.form.transform.localScale.z);
            usedSpace += (child.form.transform.localScale.z * 2);

            child.form.transform.position = new Vector3(xPos, yPos, zPos);
            if (IsScope(child))
            {
                PositionChildrenLine(child);
            }
        }
    }
Esempio n. 32
0
 public void AppendChild(CityObject cityObject)
 {
     children.Add(cityObject);
     cityObject.form.transform.SetParent(this.form.transform);
 }
    private void OnHoverOver(CityObject cityObject) {
        if (!IsInteractable(cityObject)) {
            cityObject.Highlight(false);
            return;
        }

        cityObject.Highlight(true);
        AudioManager.Instance.Play(AudioChannelIDX.GameSFX, "GridMove");
    }
Esempio n. 34
0
        internal List<CityObject> interSects(double x, double y,string type)
        {
            List<CityObject> b = new List<CityObject>();
            String sql = "SELECT c.id, c.name FROM "+ type +" c WHERE SDO_ANYINTERACT(c.shape, SDO_GEOMETRY(2001, NULL, sdo_point_type(" + x + "," + y + ",null), NULL,NULL)) = 'TRUE'";

            Console.WriteLine(sql);
            IDataReader reader = executeSelect(sql);

            while (reader.Read())
            {
                CityObject tmp = new CityObject(reader["name"].ToString());
                b.Add(tmp);
            }
            return b;
        }
 private void OnHoverOut(CityObject cityObject) {
     cityObject.Highlight(false);
 }
 protected abstract bool IsInteractable(CityObject cityObject);