Пример #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            QuadTreeNode.CalculateIndexData(GraphicsDevice);

            _oldMouseState    = Mouse.GetState();
            _oldKeyboardState = Keyboard.GetState();

            int            worldSeed               = 1;
            NoiseProvider  mainNoiseProvider       = new NoiseProvider(worldSeed, 4, 0.3f, 6000);
            NoiseProvider  modulationNoiseProvider = new NoiseProvider(worldSeed + 1, 2, 0.2f, 50000);
            DirectionLight light      = new DirectionLight(Vector3.Normalize(new Vector3(0, -0.3f, 1)), 1, 0.1f);
            Atmosphere     atmosphere = new Atmosphere(150000, new Color(0.3f, 0.5f, 0.9f));

            _world = new World(GraphicsDevice, new TerrainHeightProvider(mainNoiseProvider, modulationNoiseProvider), 1737000, light, new Random(worldSeed), atmosphere);

            Matrix cameraProjectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(60), GraphicsDevice.Viewport.AspectRatio, CentredCamera.NearPlaneDistance, CentredCamera.FarPlaneDistance);

            _camera = new CentredCamera()
            {
                Position         = new Vector3Double(0, _world.Radius + 3000, 0),
                Orientation      = Matrix.Identity,
                ProjectionMatrix = cameraProjectionMatrix,
                MovementSpeed    = 1000
            };

            _starTexture = new Texture2D(GraphicsDevice, 1, 1);
            _starTexture.SetData(new Color[] { Color.White });

            _spriteBatch = new SpriteBatch(GraphicsDevice);

            base.Initialize();
        }
Пример #2
0
        public void Icao(double altitude, double pressure, double temperature)
        {
            var atmosphere = Atmosphere.CreateICAOAtmosphere(new Measurement <DistanceUnit>(altitude, DistanceUnit.Meter));

            atmosphere.Pressure.In(PressureUnit.Pascal).Should().BeApproximately(pressure, 1);
            atmosphere.Temperature.In(TemperatureUnit.Celsius).Should().BeApproximately(temperature, 0.1);
        }
Пример #3
0
 void OnTriggerEnter(Collider collider)
 {
     if (collider.gameObject.tag == "Atmosphere")
     {
         atmosphere = collider.gameObject.GetComponent <Atmosphere>();
     }
 }
Пример #4
0
        /// <summary>
        /// TileMap constructor that takes in two ints, the width and height, and the parent ship.
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="ship"></param>
        public TileMap(int x, int y)
        {
            //parentShip = ship;

            //Initializes the x-dimension of the tilemap and creates a y-dimension in each of those indexes.
            tileMap = new ITile[x][][];
            for (int i = 0; i < x; i++)
            {
                tileMap[i] = new ITile[y][];

                for (int j = 0; j < y; j++)
                {
                    tileMap[i][j] = new ITile[MaxHeightOfTileMap];
                }
            }

            atmosphereMap = new Atmosphere[x][];
            for (int i = 0; i < x; i++)
            {
                atmosphereMap[i] = new Atmosphere[y];

                for (int j = 0; j < atmosphereMap[i].Length; j++)
                {
                    atmosphereMap[i][j] = new Atmosphere(this, i, j);
                }
            }
        }
Пример #5
0
 internal FormAtmosphere(Atmosphere atmosphere)
     : this()
 {
     this.atmosphere = atmosphere;
     UpdateFormUI();
     userControlAtmosphere.Atmosphere = atmosphere;
 }
Пример #6
0
        public Test(AtmosphericDevice device, Atmosphere inputAtmosphere, Atmosphere outputAtmosphere)
        {
            if (device == null)
            {
                throw new ArgumentNullException("device");
            }
            if (inputAtmosphere == null)
            {
                throw new ArgumentNullException("inputAtmosphere");
            }
            if (outputAtmosphere == null)
            {
                throw new ArgumentNullException("outputAtmosphere");
            }

            this.device           = device;
            this.InputAtmosphere  = inputAtmosphere;
            this.OutputAtmosphere = outputAtmosphere;

            inputHistory.Add(new AtmosphereState(InputAtmosphere));
            outputHistory.Add(new AtmosphereState(OutputAtmosphere));

            device.InputAtmosphere  = InputAtmosphere;
            device.OutputAtmosphere = OutputAtmosphere;
        }
Пример #7
0
 object ISeparatedPropertyEditor.GetEditor(object o)
 {
     atmosphere = o as Atmosphere;
     if (f == null)
     {
         f = new Forms.FormAtmosphere(atmosphere);
     }
     if (f.IsDisposed)
     {
         f = new Forms.FormAtmosphere(atmosphere);
     }
     ob[0] = f;
     if (uc == null)
     {
         uc            = new UserControls.UserControlAtmosphere();
         uc.Atmosphere = atmosphere;
     }
     if (uc.IsDisposed)
     {
         uc            = new UserControls.UserControlAtmosphere();
         uc.Atmosphere = atmosphere;
     }
     uc            = new UserControls.UserControlAtmosphere();
     uc.Atmosphere = atmosphere;
     ob[2]         = uc;
     return(ob);
 }
Пример #8
0
        public void Render(int layer = 12)
        {
            if (SunGlareMesh == null)
            {
                return;
            }

            var activeBody = GodManager.Instance.ActiveBody;

            if (activeBody == null)
            {
                return;
            }
            if (activeBody.Atmosphere == null)
            {
                return;
            }

            Atmosphere = activeBody.AtmosphereEnabled ? GodManager.Instance.ActiveBody.Atmosphere : null;

            var mpb = GodManager.Instance.ActiveBody.MPB;

            if (SunViewPortPosition.z > 0)
            {
                SunGlareMaterial.renderQueue = (int)RenderQueue + RenderQueueOffset;

                Graphics.DrawMesh(SunGlareMesh, Vector3.zero, Quaternion.identity, SunGlareMaterial, layer, CameraHelper.Main(), 0, mpb, false, false);
            }
        }
Пример #9
0
        public CurrentRoute(HostInterface host, BaseRenderer renderer)
        {
            currentHost   = host;
            this.renderer = renderer;

            Tracks = new Dictionary <int, Track>();
            Track t = new Track()
            {
                Elements = new TrackElement[0]
            };

            Tracks.Add(0, t);
            Sections = new Section[0];
            Stations = new RouteStation[0];
            BogusPreTrainInstructions = new BogusPreTrainInstruction[0];
            PointsOfInterest          = new PointOfInterest[0];
            CurrentBackground         = new StaticBackground(null, 6, false);
            TargetBackground          = new StaticBackground(null, 6, false);
            NoFogStart                 = 800.0f;
            NoFogEnd                   = 1600.0f;
            PreviousFog                = new Fog(NoFogStart, NoFogEnd, Color24.Grey, 0.0);
            CurrentFog                 = new Fog(NoFogStart, NoFogEnd, Color24.Grey, 0.5);
            NextFog                    = new Fog(NoFogStart, NoFogEnd, Color24.Grey, 1.0);
            Atmosphere                 = new Atmosphere();
            SecondsSinceMidnight       = 0.0;
            Information                = new RouteInformation();
            Illustrations.CurrentRoute = this;
        }
Пример #10
0
 public Weather(Location location, Atmosphere atmosphere, Wind wind, Condition condition)
 {
     Location   = location;
     Atmosphere = atmosphere;
     Wind       = wind;
     Condition  = condition;
 }
 public AtmosphereState(Atmosphere atmosphere)
 {
     this.Pressure    = atmosphere.PressureGassesAndLiquidsInPa;
     this.Temperature = atmosphere.Temperature;
     this.MolesCount  = atmosphere.TotalMoles;
     this.Energy      = atmosphere.GasMixture.TotalEnergy;
 }
Пример #12
0
        public string GetLogMessage()
        {
            return(string.Format(@"------------- Simulation ------------
{0}
{1}
{2}
{3}
{4}
{5}
{6}
{7}
{8}
{9}
------------- Simulation ------------",
                                 this.ToLogMessage(),
                                 Acceleration.ToLogMessage(),
                                 Aerodynamics.ToLogMessage(),
                                 Atmosphere.ToLogMessage(),
                                 Control.ToLogMessage(),
                                 Control.ControlInterval.ToLogMessage(),
                                 Control.QAlpha.ToLogMessage(),
                                 Coordinates.ToLogMessage(),
                                 Pitch.ToLogMessage(),
                                 Velocity.ToLogMessage()));
        }
Пример #13
0
 public override void StartPre(ICoreAPI api)
 {
     AtmosMagicaCore.atmos = new Atmosphere();
     // register types
     new Environment.Types.ElementalMagica();
     new Environment.Types.NaturaMagica();
     new Environment.Types.SourceMagica();
 }
Пример #14
0
        protected override void OnAtmosphereBaked(Body celestialBody, Atmosphere atmosphere)
        {
            DrawOcean = true;

            UpdateNode();

            DrawOcean = false;
        }
Пример #15
0
    void Awake()
    {
        a = (Atmosphere)target;

        validGases.Clear();
        foreach (string key in Properties.properties.Keys)
            validGases.Add(key);
    }
Пример #16
0
    public override void _Ready()
    {
        Atmosphere     atm      = GetNode(Game.ATMOSPHERE_PATH) as Atmosphere;
        BacterialState bacteria = GetNode(Game.BACTERIAL_STATE_PATH) as BacterialState;

        atm.AddComponents(new GasEscapingAC(), new ColorMixingAC(), new SandstormComingAC());
        bacteria.AddComponents(new AsymptoticGrowthBSC(), new ProductionBSC());
    }
Пример #17
0
    protected override void Update()
    {
        base.Update();

        CheckCutoff();

        if (LODTarget != null)
        {
            DistanceToLODTarget = PlanetBounds.SqrDistance(LODTarget.position);
        }
        else
        {
            DistanceToLODTarget = -1.0f;
        }

        if (Input.GetKeyDown(KeyCode.F1))
        {
            DrawNormals = !DrawNormals;

            //NOTE : Update shader variable...
            MPB.SetFloat("_DrawNormals", DrawNormals ? 1.0f : 0.0f);
        }

        if (Input.GetKeyDown(KeyCode.F2))
        {
            DrawQuadTree = !DrawQuadTree;

            //NOTE : Update shader variable...
            MPB.SetFloat("_DrawQuadTree", DrawQuadTree ? 1.0f : 0.0f);
        }

        if (Input.GetKeyDown(KeyCode.F3))
        {
            if (Atmosphere != null)
            {
                Atmosphere.Bake();
            }
        }

        if (Input.GetKeyDown(KeyCode.F4))
        {
            if (Atmosphere != null)
            {
                Atmosphere.Reanimate();
            }
        }

        if (Atmosphere != null)
        {
            Atmosphere.SetUniforms(MPB);                     // TODO : Full? Really?
        }
        if (!ExternalRendering)
        {
            Render();
        }

        UpdateLOD();
    }
Пример #18
0
 public PlantManager(Plants plants, double spreadChance_, IDictionary <Gas, float> gasDeltas_)
 {
     atmosphere        = plants.atmosphere;
     terrain           = plants.terrain;
     plantBlocks       = new HashSet <IntVector3>();
     plantActiveBlocks = new HashSet <IntVector3>();
     spreadChance      = spreadChance_;
     gasDeltas         = gasDeltas_;
 }
Пример #19
0
 // Use this for initialization
 void Start()
 {
     if (atm == null){
         atm = GameObject.Find("GameController").GetComponent<Atmosphere>();
     }
     if (wind == null){
         wind = atm.gameObject.GetComponent<Wind>();
     }
 }
Пример #20
0
 public Bar()
 {
     Food                = new Food <bool>();
     Drinks              = new Drinks <bool>();
     Atmosphere          = new Atmosphere <bool>();
     Company             = new Company <bool>();
     Music               = new Music <bool>();
     _barCharacteristics = new int[44];
 }
Пример #21
0
    }                                   //----

    public Rate()
    {
        date       = new DateTime();
        Food       = new Food <int>();
        Drinks     = new Drinks <int>();
        Atmosphere = new Atmosphere <int>();
        Music      = new Music <int>();
        Company    = new Company <int>();
    }
Пример #22
0
        //this is a test
        public void AddAtmosphere()
        {
            HasAtmosphere = true;
            atmosphere    = new Atmosphere(this.radius * 1.05f, this.radius);

            SystemCore.GameObjectManager.AddAndInitialiseGameObject(atmosphere);

            atmosphericScatteringHelper = new GroundScatteringHelper(this.testEffect, radius * 1.05f, radius);
        }
Пример #23
0
        public void ShiftPressure(double temperature, double pressure, double altitude, double expected)
        {
            var atmosphere = new Atmosphere(new Measurement <DistanceUnit>(altitude, DistanceUnit.Meter),
                                            new Measurement <PressureUnit>(pressure, PressureUnit.Pascal),
                                            true,
                                            new Measurement <TemperatureUnit>(temperature, TemperatureUnit.Celsius),
                                            0);

            atmosphere.Pressure.In(PressureUnit.Pascal).Should().BeApproximately(expected, 0.1);
        }
Пример #24
0
        public void SoundVelocity(double temperature, TemperatureUnit temperatureUnit, double pressure, PressureUnit pressureUnit, double humidity, double expected, VelocityUnit expectedUnit)
        {
            var atmosphere = new Atmosphere(new Measurement <DistanceUnit>(0, DistanceUnit.Foot),
                                            new Measurement <PressureUnit>(pressure, pressureUnit),
                                            true,
                                            new Measurement <TemperatureUnit>(temperature, temperatureUnit),
                                            humidity);

            atmosphere.SoundVelocity.In(expectedUnit).Should().BeApproximately(expected, 1);
        }
Пример #25
0
        public static float atmosOxygenTimeLeft(Entity entity, Atmosphere atmos)
        {
            float ticksPerSecond  = 1f / (float)AtmosphericsManager.Instance.TickSpeedMs;
            float oxygenPerTick   = entity.MolePerBreath * entity.BreathingEfficiency;
            float oxygenPerSecond = oxygenPerTick * ticksPerSecond;

            float timeLeft = atmos.GasMixture.Oxygen.Quantity / oxygenPerSecond;

            return(timeLeft);
        }
Пример #26
0
    public override void OnInspectorGUI()
    {
        Atmosphere cTarget = (Atmosphere)target;

        base.OnInspectorGUI();

        EditorGUILayout.Space();
        cTarget.AtmosphereBase = (AtmosphereBase)EditorGUILayout.EnumPopup("Based on (Preset):", cTarget.AtmosphereBase);
        EditorGUILayout.Space();
    }
Пример #27
0
        private static TrajectoryPoint[] Calculate(double bc, DragTableId id)
        {
            var dragTable = new MyDrag();

            var ammo = new Ammunition(
                weight: new Measurement <WeightUnit>(168, WeightUnit.Grain),
                ballisticCoefficient: new BallisticCoefficient(bc, id),
                muzzleVelocity: new Measurement <VelocityUnit>(555, VelocityUnit.MetersPerSecond),
                bulletDiameter: new Measurement <DistanceUnit>(0.224, DistanceUnit.Inch),
                bulletLength: new Measurement <DistanceUnit>(0.9, DistanceUnit.Inch));

            //define ACOG scope
            var sight = new Sight(
                sightHeight: new Measurement <DistanceUnit>(3.5, DistanceUnit.Inch),
                verticalClick: new Measurement <AngularUnit>(1.0 / 3.0, AngularUnit.InchesPer100Yards),
                horizontalClick: new Measurement <AngularUnit>(1.0 / 3.0, AngularUnit.InchesPer100Yards)
                );

            //M16 rifling
            var rifling = new Rifling(
                riflingStep: new Measurement <DistanceUnit>(12, DistanceUnit.Inch),
                direction: TwistDirection.Right);

            //standard 100 yard ACOG zeroing
            var zero = new ZeroingParameters(
                distance: new Measurement <DistanceUnit>(50, DistanceUnit.Yard),
                ammunition: null,
                atmosphere: null
                );

            //define rifle by sight, zeroing and rifling parameters
            var rifle = new Rifle(sight: sight, zero: zero, rifling: rifling);

            //define atmosphere
            var atmosphere = new Atmosphere(
                altitude: new Measurement <DistanceUnit>(0, DistanceUnit.Foot),
                pressure: new Measurement <PressureUnit>(29.92, PressureUnit.InchesOfMercury),
                pressureAtSeaLevel: false,
                temperature: new Measurement <TemperatureUnit>(59, TemperatureUnit.Fahrenheit),
                humidity: 0.78);

            var calc = new TrajectoryCalculator();

            //shot parameters
            var shot = new ShotParameters()
            {
                MaximumDistance = new Measurement <DistanceUnit>(2000, DistanceUnit.Meter),
                Step            = new Measurement <DistanceUnit>(100, DistanceUnit.Meter),
                //calculate sight angle for the specified zero distance
                SightAngle = calc.SightAngle(ammo, rifle, atmosphere, id == DragTableId.GC ? dragTable : null)
            };

            //calculate trajectory
            return(calc.Calculate(ammo, rifle, atmosphere, shot, null, id == DragTableId.GC ? dragTable : null));
        }
Пример #28
0
 private void ApplyAtmosphere(Atmosphere atmo)
 {
     foreach (Tile tile in boardTiles)
     {
         SpriteRenderer sr = tile.gameObject.GetComponent <SpriteRenderer>();
         if (sr != null)
         {
             sr.color = new Color(sr.color.r - atmo.r, sr.color.g - atmo.g, sr.color.b - atmo.b, sr.color.a - atmo.a);
         }
     }
 }
Пример #29
0
        public override void Initialize()
        {
            //http://blenderartists.org/forum/showthread.php?24038-Free-high-res-skymaps-%28Massive-07-update!%29
            var textureId = TextureFactory.LoadTexture(Path.Combine(Application.StartupPath, FileName));

            Atmosphere.SkySphere_Enable(true);
            Atmosphere.SkySphere_SetTexture(textureId);
            Atmosphere.SkySphere_SetRotation(Rotation.x, Rotation.y, Rotation.z);
            Atmosphere.SkySphere_SetScale(Scale.x, Scale.y, Scale.z);
            Atmosphere.SkySphere_SetPolyCount(PolyCount);
        }
Пример #30
0
        private void GenerateAtmosphereAndGeometry(float innerAtmosphereRatio, float outerAtmosphereRatio, float atmosphericScale, float groundScale)
        {
            planetEffect           = EffectLoader.LoadSM5Effect("AtmosphericScatteringGround").Clone();
            groundScatteringHelper = new GroundScatteringHelper(planetEffect, planetRadius * outerAtmosphereRatio,
                                                                planetRadius * innerAtmosphereRatio, groundScale);

            atmosphere = new Atmosphere(planetRadius * outerAtmosphereRatio, planetRadius * innerAtmosphereRatio, atmosphericScale);
            SystemCore.GameObjectManager.AddAndInitialiseGameObject(atmosphere);

            GenerateGeometry();
        }
Пример #31
0
 public Body()
 {
     Name       = kSystem = kSector = "";
     Atmosphere = Atmosphere.Breathable;
     Class      = Class.Terrestrial;
     Gravity    = Surface = 1;
     Terrain    = TerrainType.Varied;
     DayLength  = YearLength = Diameter = 1;
     Position   = new Coordinate();
     Region     = Region.Core;
 }
Пример #32
0
        private TrackList GetTrackList(Atmosphere atmosphere)
        {
            switch (atmosphere)
            {
            case Atmosphere.MainMenu:
                return(MainMenuTrackList);

            default:
                return(null);
            }
        }
	/// <summary>
	/// Changes the atmosphere.
	/// </summary>
	/// <param name="target">Target.</param>
	public void ChangeAtmosphere (Atmosphere target, bool backgroundSoundMuted)
	{
		switch (target) {
		case Atmosphere.Day:
			nightBackgroundSoundSources.ForEachAction (StopIfPlaying);
			if (!backgroundSoundMuted) {
				dayBackgroundSoundSources.ForEachAction (PlayIfNotAlready);
			}
			RemoveAudioSources (backgroundSoundSources, nightBackgroundSoundSources);
			backgroundSoundSources.AddRange (dayBackgroundSoundSources);
			break;
		case Atmosphere.Night:
			dayBackgroundSoundSources.ForEachAction (StopIfPlaying);
			if (!backgroundSoundMuted) {
				nightBackgroundSoundSources.ForEachAction (PlayIfNotAlready);
			}
			RemoveAudioSources (backgroundSoundSources, dayBackgroundSoundSources);
			backgroundSoundSources.AddRange (nightBackgroundSoundSources);
			break;
		}
	}
Пример #34
0
 void Awake()
 {
     atmosphere = GetComponent<Atmosphere>();
     iAtmosphere = new AtmospherePacket();
     Refresh();
 }
Пример #35
0
    void Start()
    {
        aliveCount++;
        atmosphere = GetComponentInChildren<Atmosphere>();

        minSize = transform.localScale.x;
        _ID = instanceCount;
        instanceCount ++;
        _peopleCount = peopleStart;

        resizeWithPeople();
    }
Пример #36
0
    // Use this for initialization
    void Start()
    {
        GameObject crutch = GameObject.Find("Savecrutch");
        if (crutch != null){
            savetext = crutch.GetComponent<Savecrutch>().savetext;
        }
        //lines = save_file.text.Split('\n');
        lines = savetext.Split('\n');

        indices = new int[7];
        inp = GameObject.Find("GameController").GetComponent<InputManager>();
        atm = GameObject.Find("GameController").GetComponent<Atmosphere>();

        CreateBuild();
        //save_file = Resources.Load("Saves/testsave.txt") as TextAsset;
    }
Пример #37
0
 public Conditions(Atmosphere atmosphere, Location location)
 {
     Atmosphere = atmosphere;
     Location = location;
 }
Пример #38
0
 public Weather(Location location, Atmosphere atmosphere, Wind wind, Condition condition)
 {
     Location = location;
     Atmosphere = atmosphere;
     Wind = wind;
     Condition = condition;
 }
Пример #39
0
            // Parser Apply Event
            public void Apply (ConfigNode node)
            {
                // If we have a template, generatedBody *is* the template body
                if (template != null) 
                {
                    generatedBody = template.body;

                    // Patch the game object names in the template
                    generatedBody.name = name;
                    generatedBody.celestialBody.bodyName = name;
                    generatedBody.celestialBody.transform.name = name;
                    generatedBody.celestialBody.bodyTransform.name = name;
                    generatedBody.scaledVersion.name = name;
                    if (generatedBody.pqsVersion != null)
                    {
                        generatedBody.pqsVersion.name = name;
                        generatedBody.pqsVersion.gameObject.name = name;
                        generatedBody.pqsVersion.transform.name = name;
                        foreach (PQS p in generatedBody.pqsVersion.GetComponentsInChildren(typeof (PQS), true))
                            p.name = p.name.Replace (template.body.celestialBody.bodyName, name);
                    }

                    // If we've changed the name, reset use_The_InName
                    if (generatedBody.name != template.body.name)
                    {
                        generatedBody.celestialBody.use_The_InName = false;
                    }
                    
                    // If this body has an orbit, create editor/loader
                    if (generatedBody.orbitDriver != null) 
                    {
                        orbit = new OrbitLoader(generatedBody);
                    }

                    // If this body has a PQS, create editor/loader
                    if (generatedBody.pqsVersion != null)
                    {
                        pqs = new PQSLoader(generatedBody.pqsVersion);

                        // If this body has an ocean PQS, create editor/loader
                        if (generatedBody.celestialBody.ocean == true)
                        {
                            foreach (PQS PQSocean in generatedBody.pqsVersion.GetComponentsInChildren<PQS>(true))
                            {
                                if (PQSocean.name == name + "Ocean")
                                {
                                    ocean = new OceanPQS(PQSocean);
                                    break;
                                }
                            }
                        }
                    }

                    // Create the scaled version editor/loader
                    scaledVersion = new ScaledVersion(generatedBody.scaledVersion, generatedBody.celestialBody, template.type);
                }

                // Otherwise we have to generate all the things for this body
                else 
                {
                    // Create the PSystemBody object
                    GameObject generatedBodyGameObject = new GameObject (name);
                    generatedBodyGameObject.transform.parent = Utility.Deactivator;
                    generatedBody = generatedBodyGameObject.AddComponent<PSystemBody> ();
                    generatedBody.flightGlobalsIndex = 0;

                    // Create the celestial body
                    GameObject generatedBodyProperties = new GameObject (name);
                    generatedBodyProperties.transform.parent = generatedBodyGameObject.transform;
                    generatedBody.celestialBody = generatedBodyProperties.AddComponent<CelestialBody> ();
                    generatedBody.resources = generatedBodyProperties.AddComponent<PResource> ();
                    generatedBody.celestialBody.progressTree = null;

                    // Sensible defaults 
                    generatedBody.celestialBody.bodyName = name;
                    generatedBody.celestialBody.atmosphere = false;
                    generatedBody.celestialBody.ocean = false;

                    // Create the scaled version
                    generatedBody.scaledVersion = new GameObject(name);
                    generatedBody.scaledVersion.layer = Constants.GameLayers.ScaledSpace;
                    generatedBody.scaledVersion.transform.parent = Utility.Deactivator;

                    // Create the scaled version editor/loader
                    scaledVersion = new ScaledVersion(generatedBody.scaledVersion, generatedBody.celestialBody, BodyType.Atmospheric);
                }

                // Create property editor/loader objects
                properties = new Properties (generatedBody.celestialBody);

                // Atmospheric settings
                atmosphere = new Atmosphere(generatedBody.celestialBody, generatedBody.scaledVersion);

                // Particles
                particle = new ParticleLoader(generatedBody.scaledVersion.gameObject);
            }
	/// <summary>
	/// Changes the background sound atmosphere.
	/// </summary>
	/// <param name="target">Target.</param>
	public void ChangeBackgroundSoundAtmosphere(Atmosphere target)
	{
		backgroundSound.ChangeAtmosphere(target, BackgroundSoundMuted);
	}