public LevelManLevel(string inLevel)
 {
     Game1.gammgr.playerShip.visible = true;
     level = inLevel;
     levelData = new LevelManager.LevelData();
     loaded = false;
 }
        public override void Load()
        {
            levelData = LevelManager.LoadLevel(level);

            if (Game1.IS_DEMO)
                Game1.musman.PlayNewSong(Game1.gammgr.r.Next(1, 5));
            else
                Game1.musman.PlayNewSong(Game1.gammgr.r.Next(1, 13));

            //basic black background
            bkgrnd = new Texture2D(Game1.graphics.GraphicsDevice, Game1.graphics.GraphicsDevice.DisplayMode.Width, Game1.graphics.GraphicsDevice.DisplayMode.Height,
                false, SurfaceFormat.Color);

            Color[] pixels = new Color[bkgrnd.Width * bkgrnd.Height];

            for (int y = 0; y < bkgrnd.Height; y++)
            {
                for (int x = 0; x < bkgrnd.Width; x++)
                {
                        pixels[y * bkgrnd.Width + x] = Color.Black;
                }
            }

            bkgrnd.SetData<Color>(pixels);

            //new background.
            //Soothing light blue.
            background = new Background(levelData.colorHigh, levelData.colorLow, true);
            basicEnemyColor = new Color(Vector3.One - background.topColor.ToVector3());
            PlayerBuffs.topColor = background.topColor;
            PlayerBuffs.botColor = background.botColor;

            for (int i = 0; i < Game1.gammgr.saveGameData.totalPlayerBuffs; i++)
            {
                //Add a single player Buff to the GameManager
                PlayerBuffs pb = new PlayerBuffs();
                pb.resetPosition(Game1.gammgr.playerShip.position);
                Game1.gammgr.playerBuffs.Add(pb);
            }

            spawnCounterSwitch = Game1.gammgr.r.Next(levelData.spawnLow, levelData.spawnHigh);

            bmb = new SHMUP.Enemies.BossManBoss(background.topColor, background.botColor);
            bmb.LoadNewBoss(levelData.boss);

            Game1.gammgr.lh.reset();
            Game1.gammgr.mb.Reset();
            Game1.gammgr.inTutLevel = false;

            AwardsManager.shipHit = false;
            AwardsManager.shipDead = false;
            AwardsManager.wallHit = false;
            AwardsManager.missileshot = false;

            wallBreached = false;
            gameovercounter = 0;
            breachedAtY = -1;

            loaded = true;

            Game1.gammgr.isLevelOver = false;

            GC.Collect();
        }