Example #1
0
        protected override void Draw(GameTime gameTime)
        {
            graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

            var deltaTimes = GetDeltaTimes(gameTime);

            state?.Draw(deltaTimes);
            _debugOverlay.Draw(deltaTimes);
            base.Draw(gameTime);
        }
Example #2
0
        protected override void Draw(GameTime gameTime)
        {
            if (_isResolutionChanged)
            {
                graphics.ApplyChanges();
                _isResolutionChanged = false;
            }

            graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

            var deltaTimes = GetDeltaTimes(gameTime);

            state?.Draw(deltaTimes);
            if (Config.DebugMode)
            {
                _debugOverlay.Draw(deltaTimes);
            }
            base.Draw(gameTime);
        }
        protected override void Draw(GameTime gameTime)
        {
            const double maxTint   = 0.5d;
            float        tintCoeff = (float)((1 - maxTint) + GameParameters.GameSpeed * maxTint);
            Color        bgColor   = Color.LightBlue;

            GraphicsDevice.Clear(new Color(bgColor.R / 255f, bgColor.G * tintCoeff / 255, bgColor.B * tintCoeff / 255));

            // TODO: Add your drawing code here

            base.Draw(gameTime);

            _spriteBatch.Begin();
            map.Draw(_spriteBatch, gameTime);
            debugOverlay.Draw(_spriteBatch, gameTime);
            _spriteBatch.End();

            ++frameCounter;
        }
Example #4
0
 public override void Draw(RenderTarget g)
 {
     base.Draw(g);
     debugOverlay.Draw(g);
 }
Example #5
0
 // This is for drawing 2D elements which depend on the Scene3D, e.g tooltips and health bars.
 internal void Render(DrawingContext2D drawingContext)
 {
     SelectionGui.Draw(drawingContext, Camera);
     DebugOverlay.Draw(drawingContext, Camera);
 }