Пример #1
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin(transformMatrix: camera.GetViewMatrix());

            for (int i = 0; i <= backgrounds.Count - 2; i++)
            {
                backgrounds[i].Draw(spriteBatch);
            }
            torch1.Draw(spriteBatch);
            torch2.Draw(spriteBatch);
            backgrounds[backgrounds.Count - 1].Draw(spriteBatch);
            foreach (HealthPotion HP in HealthPotion.hpList)
            {
                HP.Draw(spriteBatch);
            }
            healthBar.Draw(spriteBatch);
            healthBarBoss.Draw(spriteBatch);
            foreach (Phantom phantom in phantomList)
            {
                phantom.Draw(spriteBatch);
            }
            boss.Draw(spriteBatch);
            player.Draw(spriteBatch);

            spriteBatch.End();
        }
Пример #2
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);
            spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);

            torch.Draw(spriteBatch);

            middlePx.Draw(spriteBatch);
            spriteBatch.End();
            base.Draw(gameTime);
        }