protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(CustomColors.Teal); // _spriteBatch.Begin(transformMatrix: _camera.GetViewMatrix()); if (_useCpuKeyboard) { _cpuGuyDecorator.Draw(_spriteBatch, gameTime); } else { _guy.Draw(_spriteBatch, gameTime); } _spriteBatch.DrawString(_font, $"Press Enter to toggle between Human/CPU controls. (Currently using \"{(_useCpuKeyboard ? "CPU" : "Human")}\" controls)", _camera.Position + new Vector2(5, 5), Color.Black); _spriteBatch.DrawString(_font, $"Press B to toggle drawing of bounding boxes. (Currently {(_guy.BoundingBox.ShouldDraw ? "ON" : "OFF")})", _camera.Position + new Vector2(5, 25), Color.Black); _spriteBatch.DrawString(_font, $"Use HJKL to manipulate the camera. Shift-R to reset. [z]oom, [p]osition, [r]otation. (Currently: {_cameraController.State})", _camera.Position + new Vector2(5, 45), Color.Black); _spriteBatch.End(); // base.Draw(gameTime); }
public void Draw(SpriteBatch spriteBatch, GameTime gameTime) { Guy.Draw(spriteBatch, gameTime); spriteBatch.DrawString( _font, string.Format("Use Left/Right to cycle through the CPU control patterns (Currently on \"{0}\")", _controlPatterns.GetCurrent().Name), new Vector2(5, 25), Color.Black); }