コード例 #1
0
ファイル: SimuLite.cs プロジェクト: magico13/SimuLite
 public void ActivateSimulation(SimulationConfiguration simulation)
 {
     MakeBackupFile();
     StaticInformation.Simulation   = simulation;
     StaticInformation.IsSimulating = true;
     StaticInformation.LastEditor   = HighLogic.CurrentGame.editorFacility;
     StaticInformation.LastShip     = ShipConstruction.ShipConfig;
     activateSimulationLocks();
     lastUT = Planetarium.GetUniversalTime();
 }
コード例 #2
0
        public SimulationConfigWindow() : base(8234, "Simulation Configuration")
        {
            config = new SimulationConfiguration();

            //these are set from the last simulation
            if (StaticInformation.Simulation != null)
            {
                config.SelectedBody = StaticInformation.Simulation.SelectedBody;
                config.SimType      = StaticInformation.Simulation.SimType;

                PeString            = (StaticInformation.Simulation.Periapsis / 1000).ToString();
                ApString            = (StaticInformation.Simulation.Apoapsis / 1000).ToString();
                InclinationString   = StaticInformation.Simulation.Inclination.ToString();
                startPointSelection = (StaticInformation.Simulation.MeanAnomalyAtEpoch != 0) ? 1 : 0;
                LatString           = StaticInformation.Simulation.Latitude.ToString();
                LonString           = StaticInformation.Simulation.Longitude.ToString();
            }

            SetPe(PeString);
            SetAp(ApString);
            SetInc(InclinationString);
            SetLat(LatString);
            SetLon(LonString);
        }