Beispiel #1
0
        public static void InitialiseStarChart()
        {
            // read from json and initialise _starChart
            ScGalaxy gal = GeneralJsonSerializer.Deserialize<ScGalaxy>(Globals.GALAXY_CORE_DB, null);

            Int64 i = 1;
            Int64 j = 10000000;
            foreach (ScSolarSystem ss in gal.SolarSystems)
            {
                _scSolarSystems.Add(i, ss);
                i++;
                foreach (ScPlanet p in ss.Planets)
                {
                    _scPlanets.Add(j, p);
                    j++;
                }
            }            
        }
Beispiel #2
0
 public static Galaxy Load()
 {
     return(GeneralJsonSerializer.Deserialize <Galaxy>(Globals.SERVER_SAVE_FILE, new GalaxyConverter()));
 }