Beispiel #1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);
            currentScreen.Draw(gameTime, spriteBatch);
            CursorManager.Draw(spriteBatch);

            base.Draw(gameTime);
        }
        protected override void Draw(GameTime gameTime)
        {
            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.None, RasterizerState.CullCounterClockwise, null, transformMatrix: currentCamera.GetViewMatrix());
            GraphicsDevice.Clear(Color.Black);

            switch (gameState)
            {
            case GameState.World:
                worldStateManager.Draw(spriteBatch);
                break;

            case GameState.Inventory:
                inventoryStateManager.Draw(spriteBatch);
                break;

            case GameState.InGameMenu:
                inGameMenuStateManager.Draw(spriteBatch);
                break;
            }
            cursorManager.Draw(spriteBatch);
            spriteBatch.End();
            base.Draw(gameTime);
        }