Exemplo n.º 1
0
        /// <summary>
        /// Sets a default SkyBox, which is a box aligned with the border of the world.  The SkyBox is needed
        /// so that you can set the walls, ceiling or floor to different colors using setSideSolidColor or to
        /// different textures using setSideTexture.  You use these functions on the SkyBox.
        /// </summary>
        public virtual void fixSkyBox()
        {
            cRealBox3 skeleton = _border;

            if (skeleton.ZSize < 0.5f)
            {
                skeleton.setZRange(cGame.BACKGROUNDOFFSET, 1.0f); /* Move LOZ down to
                                                                   * avoid z-fighting with sprites in the xy plane.  MOve HIZ up to make
                                                                   * walls around the world.*/
            }
            setSkyBox(skeleton.LoCorner, skeleton.HiCorner, -1);
            //Make the walls four shades.
            SkyBox.setSideSolidColor(cRealBox3.LOX, Color.FromArgb(180, 30, 200));
            SkyBox.setSideSolidColor(cRealBox3.HIX, Color.FromArgb(30, 10, 180));
            SkyBox.setSideSolidColor(cRealBox3.LOY, Color.FromArgb(255, 200, 200));
            SkyBox.setSideSolidColor(cRealBox3.HIY, Color.FromArgb(10, 255, 200));
            //Make floor be almost black
            SkyBox.setSideSolidColor(cRealBox3.LOZ, Color.FromArgb(15, 15, 15));
            //Make the top side transparent
            SkyBox.setSideInvisible(cRealBox3.HIZ); /* Means make it gray and
                                                     * don't draw it. */
            SkyBox.Edged           = false;         //Turns off edges for the filled faces.
            SkyBox.LineColor       = Color.DarkGray;
            SkyBox.LineWidthWeight = cColorStyle.LW_IGNORELINEWIDTHWEIGHT;
            SkyBox.LineWidth       = 1;
        }