Beispiel #1
0
        /// <summary>
        /// Génération de la Skybox.
        /// </summary>
        private void GenerateSkyBox()
        {
            if (_level.SkyboxType != SkyboxType.None)
            {
                string[] skyAssets;

                if (_level.SkyboxType == SkyboxType.Day)
                {
                    skyAssets = Assets.SkyboxLand;
                }
                else
                {
                    skyAssets = Assets.SkyboxNight;
                }

                _skybox = new SkyBox(Math.Max(_level.Width * _level.BlockSizes.Width, _level.Depth * _level.BlockSizes.Depth) * 4.5f, skyAssets);
                _skybox.LoadContent();
                _skybox.SetLightEnable(false);
                _skybox.Position = new Vector3((_level.Width * _level.BlockSizes.Width), 0, (_level.Depth * _level.BlockSizes.Depth));
                Add(_skybox);
            }
        }