Beispiel #1
0
        void Start()
        {
            Log("Starting");
            try
            {
                mucore.init();
                vesselState = new VesselState();
                attitude    = new AttitudeController(this);
                stage       = new StageController(this);
                attitude.OnStart();
                stagestats            = new StageStats(stage);
                stagestats.editorBody = getVessel.mainBody;
                stagestats.OnModuleEnabled();
                stagestats.OnFixedUpdate();
                stagestats.RequestUpdate(this);
                stagestats.OnFixedUpdate();
                CreateButtonIcon();
                LaunchName = new string(getVessel.vesselName.ToCharArray());
                LaunchBody = getVessel.mainBody;
                launchdb   = new LaunchDB(this);
                launchdb.Load();

                mainWindow      = new Window.MainWindow(this, 6378070);
                flightMapWindow = new Window.FlightMapWindow(this, 548302);
                statsWindow     = new Window.StatsWindow(this, 6378070 + 4);

                GameEvents.onShowUI.Add(ShowGUI);
                GameEvents.onHideUI.Add(HideGUI);
            }
            catch (Exception ex)
            {
                Log(ex.ToString());
            }
        }
Beispiel #2
0
        void Start()
        {
            instance = this;
            Log("Starting");
            try
            {
                mucore.init();
                vesselState = new VesselState();
                attitude    = new AttitudeController(this);
                stage       = new StageController(this);
                attitude.OnStart();
                stagestats            = new StageStats(stage);
                stagestats.editorBody = getVessel.mainBody;
                stagestats.OnModuleEnabled();
                stagestats.OnFixedUpdate();
                stagestats.RequestUpdate(this);
                stagestats.OnFixedUpdate();
                CreateButtonIcon();
                LaunchName = new string(getVessel.vesselName.ToCharArray());
                LaunchBody = getVessel.mainBody;
                launchdb   = new LaunchDB(this);
                launchdb.Load();

                mainWindow      = new Window.MainWindow(this, 6378070);
                flightMapWindow = new Window.FlightMapWindow(this, 548302);
                statsWindow     = new Window.StatsWindow(this, 6378070 + 4);
                double h = 80f;
                if (FlightGlobals.ActiveVessel.mainBody.atmosphere)
                {
                    h = Math.Max(h, FlightGlobals.ActiveVessel.mainBody.atmosphereDepth + 10000f);
                    DestinationHeight = new EditableValue(h, locked: true) / 1000;
                }

                delayUT = double.NaN;

                GameEvents.onShowUI.Add(ShowGUI);
                GameEvents.onHideUI.Add(HideGUI);

                LoadKeybind();
            }
            catch (Exception ex)
            {
                Log(ex.ToString());
            }
        }