示例#1
0
 private void LoadParts()
 {
     Parts = new List<OCFPart>();
     foreach (var group in cbin.Groups.Where(g => g.Value.StartsWith("part")))
     {
         var p = new OCFPart();
         p.Name = group.GetString("NAME", "");
         p.PAKName = group.GetString("PAK", "");
         p.Scale = group.GetDouble("SCALE", 1);
         p.AttachTo = group.GetString("ATTACH", null);
         if (p.AttachTo != null)
             p.AttachToParams = group.GetInts("ATTACH");
         p.Angles = group.GetInts("ANGLES");
         p.Type = group.GetInt("TYPE", 0);
         p.SubType = group.GetInt("SUB_TYPE", 0);
         p.LandDock = group.GetInts("LAUNCH_DOCK");
         p.PartId = group.GetInt("PART_ID", 0);
         Parts.Add(p);
     }
 }
示例#2
0
 private void LoadParts()
 {
     Parts = new List <OCFPart>();
     foreach (var group in cbin.Groups.Where(g => g.Value.StartsWith("part")))
     {
         var p = new OCFPart();
         p.Name     = group.GetString("NAME", "");
         p.PAKName  = group.GetString("PAK", "");
         p.Scale    = group.GetDouble("SCALE", 1);
         p.AttachTo = group.GetString("ATTACH", null);
         if (p.AttachTo != null)
         {
             p.AttachToParams = group.GetInts("ATTACH");
         }
         p.Angles   = group.GetInts("ANGLES");
         p.Type     = group.GetInt("TYPE", 0);
         p.SubType  = group.GetInt("SUB_TYPE", 0);
         p.LandDock = group.GetInts("LAUNCH_DOCK");
         p.PartId   = group.GetInt("PART_ID", 0);
         Parts.Add(p);
     }
 }