コード例 #1
0
 public static void LoadAvionicsConfigs(ConfigNode node)
 {
     allTechNodes = new List <ProceduralAvionicsConfig>();
     foreach (ConfigNode tNode in node.GetNodes("AVIONICSCONFIG"))
     {
         ProceduralAvionicsConfig config = new ProceduralAvionicsConfig();
         config.Load(tNode);
         config.InitializeTechNodes();
         allTechNodes.Add(config);
         ProceduralAvionicsUtils.Log("Loaded AvionicsConfg: ", config.name);
     }
 }
コード例 #2
0
        public void LoadAvionicsConfigs(ConfigNode node)
        {
            proceduralAvionicsConfigs = new Dictionary <string, ProceduralAvionicsConfig>();
            foreach (ConfigNode tNode in node.GetNodes("AVIONICSCONFIG"))
            {
                ProceduralAvionicsConfig config = new ProceduralAvionicsConfig();
                config.Load(tNode);
                config.InitializeTechNodes();
                proceduralAvionicsConfigs.Add(config.name, config);
                Log("Loaded AvionicsConfg: ", config.name);
            }

            List <ProceduralAvionicsConfig> configList = proceduralAvionicsConfigs.Values.ToList();

            proceduralAvionicsConfigsSerialized = ObjectSerializer.Serialize(configList);
            Log("Serialized configs");
        }