createTargets() public méthode

public createTargets ( List &t ) : void
t List
Résultat void
Exemple #1
0
        public void Open(RelayNode nodeIn)
        {
            if (show && nodeIn.Equals(this.node))
            {
                Close();
                return;
            }
            this.node = nodeIn;

            RTGlobals.targets = new List <Target>();

            CBOrV SortNetwork = new CBOrV(Planetarium.fetch.Sun, this.node);

            SortNetwork.createTargets(ref RTGlobals.targets);



            RTGlobals.targets.Add(new Target());
            RTGlobals.targets[RTGlobals.targets.Count - 1].GUIListname = RTGlobals.targets[RTGlobals.targets.Count - 1].Name;
            RTGlobals.targets[RTGlobals.targets.Count - 1].color       = Color.red;


            settingNodes = new List <SatSettingNode>();

            if (node.IsLoaded)
            {
                LoadFromLoaded();
            }
            else
            {
                LoadFromUnLoaded();
            }
            this.show = true;
        }
        public void Open(PartModule moduleIn)
        {
            if (!moduleIn.vessel.loaded)
            {
                Close();
                return;
            }
            this.module = moduleIn;

            RTGlobals.targets = new List <Target>();

            CBOrV SortNetwork = new CBOrV(Planetarium.fetch.Sun, new RelayNode(moduleIn.vessel));

            SortNetwork.createTargets(ref RTGlobals.targets);



            RTGlobals.targets.Add(new Target());
            RTGlobals.targets[RTGlobals.targets.Count - 1].GUIListname = RTGlobals.targets[RTGlobals.targets.Count - 1].Name;
            RTGlobals.targets[RTGlobals.targets.Count - 1].color       = Color.red;


            if (RTUtils.containsField(module, "dishRange") && (float)module.Fields.GetValue("dishRange") > 0)
            {
                settingNode = new SatSettingNode(module);
                if (RTUtils.containsField(module, "antennaName"))
                {
                    antennaName = (string)module.Fields.GetValue("antennaName");
                }
                else
                {
                    antennaName = "Dish";
                }

                this.show = true;
            }
        }
        public void Open(RelayNode nodeIn)
        {
            if (show && nodeIn.Equals(this.node))
            {
                Close();
                return;
            }
            this.node = nodeIn;

            RTGlobals.targets = new List<Target>();

            CBOrV SortNetwork = new CBOrV(Planetarium.fetch.Sun, this.node);
            SortNetwork.createTargets(ref RTGlobals.targets);

            RTGlobals.targets.Add(new Target());
            RTGlobals.targets[RTGlobals.targets.Count - 1].GUIListname = RTGlobals.targets[RTGlobals.targets.Count - 1].Name;
            RTGlobals.targets[RTGlobals.targets.Count - 1].color = Color.red;

            settingNodes = new List<SatSettingNode>();

            if (node.IsLoaded)
                LoadFromLoaded();
            else
                LoadFromUnLoaded();
            this.show = true;
        }