protected override void Draw(GameTime gameTime)
 {
     GraphicsDevice.Clear(Color.CornflowerBlue);
     spriteBatch.Begin();
     floor.Draw(spriteBatch);
     player.Draw(spriteBatch);
     ui.Draw(spriteBatch);
     enemy.Draw(spriteBatch);
     spriteBatch.End();
     base.Draw(gameTime);
 }
示例#2
0
        public override void Draw(GameTime gameTime)
        {
            _spriteBatch.Begin();
            _spriteBatch.Draw(_background, Vector2.Zero, Color.White);
            _maze.Draw(gameTime, _spriteBatch);
            _player.Draw(gameTime, _spriteBatch);
            _enemy.Draw(gameTime, _spriteBatch);
            _scoreDisplay.Draw(gameTime, _spriteBatch);
            _getReady.Draw(gameTime, _spriteBatch);
            _gameOver.Draw(gameTime, _spriteBatch);
            _livesDisplay.Draw(gameTime, _spriteBatch);
            _pauseDialog.Draw(gameTime, _spriteBatch);

            if (MonsterGame.Instance.DebugMode)
            {
                FontManager.DrawString(_spriteBatch, "Col: " + _player.Column + ", Row: " + _player.Row + ", " + _maze.GetTile(_player.Row, _player.Column).TileType, Vector2.Zero, Color.White);
                FontManager.DrawString(_spriteBatch, "X: " + _player.Position.X + ", Y: " + _player.Position.Y, new Vector2(0, 40), Color.White);
                FontManager.DrawString(_spriteBatch, "L: " + _player.BoundingBox.Left + ", R: " + _player.BoundingBox.Right, new Vector2(0, 80), Color.White);
                FontManager.DrawString(_spriteBatch, "T: " + _player.BoundingBox.Top + ", B: " + _player.BoundingBox.Bottom, new Vector2(0, 120), Color.White);
                FontManager.DrawString(_spriteBatch, "W: " + _player.BoundingBox.Width + ", H: " + _player.BoundingBox.Height, new Vector2(0, 160), Color.White);
            }
            _spriteBatch.End();
        }