/// <summary>
        /// Create user interface renderer
        /// </summary>
        public UIRenderer()
        {
            background = new Texture("background.png");
            buttons    = new Texture("buttons.png");
            headers    = new Texture("headers.png");
#if XBOX360
            helpScreen    = new Texture("HelpScreenXbox360.png");
            optionsScreen = new Texture("OptionsScreenXbox360.png");
#else
            helpScreen    = new Texture("HelpScreenWindows.png");
            optionsScreen = new Texture("OptionsScreenWindows.png");
#endif
            mouseCursor = new Texture("MouseCursor.png");
            ingame      = new Texture("Ingame.png");
            trophies[0] = new Texture("pokal1");
            trophies[1] = new Texture("pokal2");
            trophies[2] = new Texture("pokal3");
            font        = new TextureFont();

            postScreenMenuShader = new PostScreenMenu();
            postScreenGameShader = new PostScreenGlow();
            skyCube   = new PreScreenSkyCubeMapping();
            lensFlare = new LensFlare(LensFlare.DefaultSunPos);
            BaseGame.LightDirection = LensFlare.DefaultLightPos;
        }
        /// <summary>
        /// Create user interface renderer
        /// </summary>
        public UIRenderer()
        {
            background = new Texture("background.png");
            buttons    = new Texture("buttons.png");
            headers    = new Texture("headers.png");
#if XBOX360
            helpScreen    = new Texture("HelpScreenXbox360.png");
            optionsScreen = new Texture("OptionsScreenXbox360.png");
#else
            helpScreen    = new Texture("HelpScreenWindows.png");
            optionsScreen = new Texture("OptionsScreenWindows.png");
#endif
            mouseCursor = new Texture("MouseCursor.png");
            ingame      = new Texture("Ingame.png");
            trophies[0] = new Texture("pokal1");
            trophies[1] = new Texture("pokal2");
            trophies[2] = new Texture("pokal3");
            font        = new TextureFont();

            postScreenMenuShader = new PostScreenMenu();
            postScreenGameShader = new PostScreenGlow();
            skyCube   = new PreScreenSkyCubeMapping();
            lensFlare = new LensFlare(LensFlare.DefaultSunPos);
            BaseGame.LightDirection = LensFlare.DefaultLightPos;

            nameBatch = new SpriteBatch(RacingGameManager.graphicsManager.GraphicsDevice);
            nameFont  = RacingGameManager.Content.Load <SpriteFont>("Content\\NameFont");
        }
        }         // Dispose(someObject)

        /// <summary>
        /// Dispose
        /// </summary>
        /// <param name="someObject">Some object</param>
        public static void Dispose(ref PreScreenSkyCubeMapping someObject)
        {
            if (someObject != null)
            {
                someObject.Dispose();
            }
            someObject = null;
        }         // Dispose(someObject)
Example #4
0
 /// <summary>
 /// Dispose
 /// </summary>
 /// <param name="someObject">Some object</param>
 public static void Dispose(ref PreScreenSkyCubeMapping someObject)
 {
     if (someObject != null)
         someObject.Dispose();
     someObject = null;
 }