Exemplo n.º 1
0
        private void DrawChildren(SpriteBatch spriteBatch, Player player)
        {
            foreach (Powerup powerup in powerupList)
            {
                powerup.Draw(spriteBatch);
            }

            foreach (Enemy _enemy in enemyList.Reverse <Enemy>())
            {
                //if (_enemy.Rect.Intersects(player.bgRect))
                _enemy.Draw(spriteBatch);
            }

            foreach (Bullet _bullet in bulletList.Reverse <Bullet>())
            {
                //if (_bullet.Rect.Intersects(player.bgRect))
                _bullet.Draw(spriteBatch);
            }

            // Fixes an unknown error
            if (core.Texture != null) //&& core.Rect.Intersects(player.bgRect))
            {
                core.Draw(spriteBatch);
            }
        }