Beispiel #1
0
        void setInitVars()
        {
            foreach (CelestialBody body in PlanetMap.Keys)
            {
                PlanetMap[body].SetBodyKSun((float)Heating.calculateBodyKSun(body.orbit.radius));

                for (int AltLayer = 0; AltLayer < PlanetMap[body].LiveMap.Count; AltLayer++)
                {
                    foreach (Cell cell in Cell.AtLevel(KWSSettings.gridLevel))
                    {
                        PlanetMap[body].SetInitTempOfCell(FlightGlobals.getExternalTemperature
                                                              (PlanetMap[body].LiveMap[AltLayer][cell].Altitude, body), AltLayer, cell);

                        PlanetMap[body].SetInitPressureOfCell((float)FlightGlobals.getStaticPressure
                                                                  (PlanetMap[body].LiveMap[AltLayer][cell].Altitude, body), AltLayer, cell);

                        PlanetMap[body].SetInitDensityOfCell((float)FlightGlobals.getAtmDensity
                                                                 (PlanetMap[body].LiveMap[AltLayer][cell].Pressure), AltLayer, cell);
                    }
                }
            }
        }
        public DebugGUI(Heating heat)
        {
            GameObject sun = GameObject.Find("Sun");

            GUILayout.Label("Body KSun: " + Heating.calculateBodyKSun(sun.transform.position.magnitude));
        }