Пример #1
0
        protected override void Draw(GameTime gameTime)
        {
            Profiler.EndFrame();
            Profiler.BeginFrame();
            if (Profiler.InContext("OutOfContext"))
            {
                Profiler.ExitContext("OutOfContext");
            }
            Profiler.EnterContext("RenderFrame");

            if (!IsMinimized)
            {
                if (ActiveModel is WorldModel)
                {
                    CheckWindowSize(Settings.UserInterface.PlayWindowGumpResolution.Width, Settings.UserInterface.PlayWindowGumpResolution.Height);
                }
                else
                {
                    CheckWindowSize(800, 600);
                }

                ActiveModel.GetView()
                .Draw(gameTime.ElapsedGameTime.TotalMilliseconds);
                UserInterface.Draw(gameTime.ElapsedGameTime.TotalMilliseconds);
            }

            Profiler.ExitContext("RenderFrame");
            Profiler.EnterContext("OutOfContext");

            UpdateWindowCaption(gameTime);
        }
Пример #2
0
        protected override void Draw(GameTime gameTime)
        {
            Profiler.EndFrame();
            Profiler.BeginFrame();
            if (Profiler.InContext("OutOfContext"))
            {
                Profiler.ExitContext("OutOfContext");
            }
            Profiler.EnterContext("RenderFrame");

            if (!IsMinimized)
            {
                SpriteBatch3D.Reset();
                GraphicsDevice.Clear(Color.Black);

                ActiveModel.GetView()
                .Draw(gameTime.ElapsedGameTime.TotalMilliseconds);
                UserInterface.Draw(gameTime.ElapsedGameTime.TotalMilliseconds);
            }

            Profiler.ExitContext("RenderFrame");
            Profiler.EnterContext("OutOfContext");

            UpdateWindowCaption(gameTime);
        }
Пример #3
0
        protected override void Draw(GameTime gameTime)
        {
            if (IsMinimized)
            {
                return;
            }
            SpriteBatch3D.ResetZ();
            GraphicsDevice.Clear(Color.Black);
            ActiveModel.GetView()
            .Draw(gameTime.ElapsedGameTime.TotalMilliseconds);
            UserInterface.Draw(gameTime.ElapsedGameTime.TotalMilliseconds);

            EngineVars.UpdateFPS(gameTime.ElapsedGameTime.TotalMilliseconds);
            Window.Title =
                Settings.Debug.ShowFps ?
                string.Format("UltimaXNA FPS:{0}", EngineVars.UpdateFPS(gameTime.ElapsedGameTime.TotalMilliseconds)) :
                "UltimaXNA";
        }