示例#1
0
 private void CreateProperties(ArchSolarComponent arch)
 {
     foreach (ArchSolarComponentProperty prop in arch.properties)
     {
         AddProperty(prop);
     }
 }
示例#2
0
        public SolarComponent(Solar solar, ArchSolarComponent arch)
        {
            this.id         = arch.id;
            this.solar      = solar;
            this.properties = new Dictionary <Type, SolarComponentProperty>();
            this.hardpoints = new Dictionary <ulong, SolarComponentHardpoint>();

            CreateProperties(arch); // should be first before creating hardpoints
            CreateHardpoints(arch);
        }
示例#3
0
        private void CreateHardpoints(ArchSolarComponent arch)
        {
            SolarComponentPropertyRigidHull hull = GetProperty <SolarComponentPropertyRigidHull>();

            if (hull == null)
            {
                return;
            }

            foreach (ArchComponentHardpoint hp in arch.hardpoints)
            {
                SolarComponentHardpoint hardpoint = new SolarComponentHardpoint(hp, hull);

                hardpoints.Add(hardpoint.id, hardpoint);
            }
        }