Beispiel #1
0
        /// <summary>
        /// Draw this state to the screen.
        /// </summary>
        public override void Draw()
        {
            fps.IncrementFrames();

            SpriteBatch batch = ServiceManager.Game.Batch;

            ServiceManager.Game.GraphicsDevice.RenderState.DepthBufferEnable = true;

            GraphicOptions.graphics.GraphicsDevice.Clear(GraphicOptions.BackgroundColor);//Must manually clear since we're not using the main Draw()

            batch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.FrontToBack, SaveStateMode.SaveState);
            batch.Draw(sky, ServiceManager.Game.GraphicsDevice.Viewport.TitleSafeArea, Color.White);
            batch.End();

            Scene.Draw(false);

            batch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.FrontToBack, SaveStateMode.SaveState);


            batch.DrawString(ServiceManager.Game.Font,
                             fps.GetFormattedFPS(), Vector2.Zero, Color.White);
            batch.DrawString(ServiceManager.Game.Font,
                             FormatTimeLeft(timeLeft), Vector2.UnitX * 300, Color.White);

            batch.End();

            tips.Draw();
            buffbar.Draw();
            if (mouseCursor != null)
            {
                mouseCursor.Draw();
            }
            hud.Draw();
            cd.Draw();
            Chat.Draw();
            miniMap.Draw(localPlayer.Position);

            Scores.Draw();
            helpOverlay.Draw();
        }