Exemplo n.º 1
0
        public override void Draw(float deltaTime)
        {
            stats.OnDraw();

            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin(SpriteSortMode.BackToFront);

            currentAnimator.Draw(spriteBatch);

            DrawText("FPS: " + stats.DrawRate, new Vector2(Width - 100, 10), 0.6f, Color.Yellow);

            DrawText(rtfm, new Vector2(10, 10), 0.6f, Color.Black);
            DrawText(status, new Vector2(10, Height - 50), 1.0f, Color.Black);
            DrawText(metadata, new Vector2(Width - 300, Height * 0.5f), 0.6f, Color.Black);
            spriteBatch.End();
        }
Exemplo n.º 2
0
        protected override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);

            stats.OnDraw();

            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin(SpriteSortMode.BackToFront);

            animator.Draw(spriteBatch);

            DrawText("FPS: " + stats.DrawRate, new Vector2(WindowWidth - 100, 10), 0.6f, Color.Yellow);

            DrawText(Constants.KeyBindings, new Vector2(10, 10), 0.6f, Color.Black);
            DrawText(animatorInfo, new Vector2(10, WindowHeight - 50), 1.0f, Color.Black);
            DrawText(metadata, new Vector2(WindowWidth - 300, WindowHeight * 0.5f), 0.6f, Color.Black);
            spriteBatch.End();
        }
Exemplo n.º 3
0
        public override void Draw(GameTime gameTime)
        {
            string statStr  = string.Format("FPS = {0}\nMEM (KB) = {1:n0}", stats.FrameRate, stats.MemoryKb);
            string allocStr = stats.GcHappened ? "!!!GC!!!" : string.Format("KB/S = {0:n0}", stats.FrameMallocKb);

            stats.OnDraw();

            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin(SpriteSortMode.BackToFront);

            currentAnimator.Draw(spriteBatch);

            DrawText(statStr, new Vector2(Width - 150, 10), 0.6f, Color.Yellow);
            DrawText(allocStr, new Vector2(Width - 150, 50), 0.6f, stats.GcHappened ? Color.Red : Color.Yellow);

            DrawText(rtfm, new Vector2(10, 10), 0.6f, Color.Black);
            DrawText(status, new Vector2(10, Height - 50), 1.0f, Color.Black);
            DrawText(metadata, new Vector2(Width - 300, Height * 0.5f), 0.6f, Color.Black);
            spriteBatch.End();
        }