Example #1
0
        public void Draw(SpriteBatch sb)
        {
            stage.Draw(sb);

            for (int i = Lists.enemyList.Count - 1; i >= 0; i--)
            {
                EnemyPrime enemy = Lists.enemyList[i];
                enemy.Draw(sb);
            }

            for (int i = 0; i <= Lists.playerBulletList.Count - 1; i++)
            {
                PlayerBulletPrime playerbullet = Lists.playerBulletList[i];
                playerbullet.Draw(sb);
            }

            for (int i = 0; i <= Lists.bomb.Count - 1; i++)
            {
                Bomb bomb = Lists.bomb[i];
                bomb.Draw(sb);
            }

            for (int i = 0; i <= Lists.itemList.Count - 1; i++)
            {
                ItemPrime item = Lists.itemList[i];
                item.Draw(sb);
            }

            if (Lists.playerList.Count == 1)
            {
                Lists.playerList[0].Draw(sb);
            }

            for (int i = Lists.FXList.Count - 1; i >= 0; i--)
            {
                FX fx = Lists.FXList[i];
                if (!fx.GetAdditiveStatus())
                {
                    fx.Draw(sb);
                }
            }
            for (int i = 0; i <= Lists.bulletList.Count - 1; i++)
            {
                Bullet bullet = Lists.bulletList[i];
                if (!bullet.GetAdditiveStatus())
                {
                    bullet.Draw(sb);
                }
            }
            sb.End();

            sb.Begin(SpriteSortMode.Deferred, BlendState.Additive);
            for (int i = Lists.FXList.Count - 1; i >= 0; i--)
            {
                FX fx = Lists.FXList[i];
                if (fx.GetAdditiveStatus())
                {
                    fx.Draw(sb);
                }
            }
            for (int i = 0; i <= Lists.bulletList.Count - 1; i++)
            {
                Bullet bullet = Lists.bulletList[i];
                if (bullet.GetAdditiveStatus() || bullet.GetDelay())
                {
                    bullet.Draw(sb);
                }
            }
            sb.End();

            sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);

            if (Lists.playerList.Count == 1)
            {
                if (Lists.playerList[0].GetFocused())
                {
                    sb.Draw(Assets.player, Lists.playerList[0].GetPosition(), new Rectangle(22, 0, 28, 28), Color.White, 0, new Vector2(14f, 14f), 1, SpriteEffects.None, 0);
                }
            }



            sb.Draw(Assets.hud, new Vector2(0, 0), Color.White);
            GameStats.Draw(sb);

            for (int i = Lists.enemyList.Count - 1; i >= 0; i--)
            {
                EnemyPrime enemy = Lists.enemyList[i];
                enemy.BossStatsDraw(sb);
            }
        }