Beispiel #1
0
        public override void Draw(GameTime gameTime)
        {
            _game.GraphicsDevice.Clear(Color.SkyBlue);
            _game.GameClient.World.Draw(gameTime, _player.IsUnderWater);
            _player.Draw(gameTime);
            _debugInfo.Draw(gameTime);
            _blockSelection.Draw(gameTime);

            //_weaponManager.Draw(gameTime);

            // _spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.SaveState);
            _spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);

            if (_player.IsUnderWater)
            {
                Rectangle screenRect = new Rectangle(0, 0, _game.GraphicsDevice.Viewport.Width, _game.GraphicsDevice.Viewport.Height);
                _spriteBatch.Draw(_underWaterTexture, screenRect, Color.White);
            }
            _spriteBatch.Draw(_crosshairTexture, new Vector2(
                                  (Game.GraphicsDevice.Viewport.Width / 2) - 10,
                                  (Game.GraphicsDevice.Viewport.Height / 2) - 10), Color.White);
            _blockPicker.Draw(gameTime);
            _spriteBatch.End();
        }