Exemplo n.º 1
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(Tex, Pos, Color.White);
     if (InvWindow.Shown == false)
     {
         InvBar.Draw(spriteBatch);
     }
     if (InvWindow.Shown == true)
     {
         InvWindow.Draw(spriteBatch);
     }
 }
Exemplo n.º 2
0
        protected override void Draw(GameTime gameTime)
        {
            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, camera.Transform);

            // Set background to white and render background
            GraphicsDevice.Clear(Color.White);
            background.Draw(spriteBatch, camera);

            // Draw map
            int calls = Map.Draw(spriteBatch, camera);

            Debug.WriteLineIf(gameTime.IsRunningSlowly, "Draw is running slowly: " + calls + " tiles updated");

            Player.Draw(spriteBatch, camera);

            // Inventory
            inventoryBar.Draw(spriteBatch, camera);
            inventory.Draw(spriteBatch, camera);

            spriteBatch.End();

            base.Draw(gameTime);
        }