XPlane.Core.Miscellaneous.Skybox.Skybox C# (CSharp) Method

Skybox() public method

Initializes a new Skybox class.
public Skybox ( Texture2D skyTextures ) : Sharpex2D
skyTextures Sharpex2D.Rendering.Texture2D The SkyTextures.
return Sharpex2D
        public Skybox(Texture2D[] skyTextures)
        {
            //Skybox supports 3 layers, background, layer 1, layer 2

            _background = skyTextures[0];
            _layer1 = skyTextures[1];
            _layer2 = skyTextures[2];

            _backgroundPosition = new Vector2(0, 0);
            _layer1Position1 = new Vector2(0, 0);
            _layer2Position1 = new Vector2(0, 0);

            _layer1Position2 = new Vector2(800, 0);
            _layer2Position2 = new Vector2(800, 0);

            _layer1Position3 = new Vector2(1600, 0);
            _layer2Position3 = new Vector2(1600, 0);

            IsActive = true;
        }