Пример #1
0
        /// <summary>
        ///   Draws a frame
        /// </summary>
        /// <param name = "gameTime" />
        void IDraw.Draw(GameTime gameTime)
        {
            bool sunburnSplashScreenDisplayComplete = SplashScreen.DisplayComplete;

            if (sunburnSplashScreenDisplayComplete)
            {
                BeginFrame(gameTime);
            }

            for (int i = 0; i < Layers.Count; i++)
            {
                ILayer layer = Layers[i];
                if (layer is SunBurnLayer && !sunburnSplashScreenDisplayComplete)
                {
                    continue;
                }

                if (layer.IsVisible)
                {
                    layer.BeginDraw(gameTime);
                    layer.Draw(gameTime);
                    layer.EndDraw(gameTime);
                }
            }

            Draw(gameTime);

            if (sunburnSplashScreenDisplayComplete)
            {
                EndFrame();
            }
        }