Example #1
0
        /// <summary>
        /// Aktualisiert die Objektrefferenzen, die beim erzeugen des Objektes noch nicht vorhanden waren
        /// </summary>
        public void updateData(GameData data)
        {
            need_tech = new List<Tech>();

            string[] split1 = need_tech_temp.Split(new String[] { ", " }, StringSplitOptions.None);
            foreach (string id in split1)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    need_tech.Add(data.getTech(id2));
                }
            }

            race = new List<Race>();

            string[] split2 = race_temp.Split(new String[] { ", " }, StringSplitOptions.None);
            foreach (string id in split2)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    race.Add(data.getRace(id2));
                }
            }

            update = new List<Update>();

            string[] split3 = update_temp.Split(new String[] { ", " }, StringSplitOptions.None);
            foreach (string id in split3)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    update.Add(data.getUpdate(id2));
                }
            }
        }