示例#1
0
        public static void loadLevel(int levelNumber)
        {
            EnemyManager.clear();
            PickUpManager.clear();
            if (levelNumber != m_LevelNumber)
            {
                m_LevelNumber = levelNumber;
            }
            //TODO: call enemy manager clear
            BackgroundMusic.playSong(levelNumber, 0.30f);
            string level = "Content/Level" + levelNumber + ".txt";

            parseData(level);
            if (levelNumber >= 3)
            {
                Background.loadContent(Content, 3, 1);
            }
            else
            {
                Background.loadContent(Content, levelNumber + 1, 1);
            }
            if (levelNumber == 3)
            {
                Boss.IsActive = true;;
            }
            Player.reset();
            Player.setInitialPosition();
            EnemyManager.loadContent(Content);
            GateManager.reset();
            GateManager.loadContent(Content);
            PickUpManager.loadContent(Content);
        }
示例#2
0
        public void loadContent(ContentManager content, string tileSetName, string tileSetData)
        {
            m_TileSet = content.Load <Texture2D>(tileSetName);
            parseData(tileSetData);
            BackgroundMusic.playSong(0, 0.30f);

            Content = content;
        }
示例#3
0
 public static void levelIncrement()
 {
     if (m_LevelNumber < 3)
     {
         m_LevelNumber++;
         levelCount++;
         loadLevel(m_LevelNumber);
         BackgroundMusic.playSong(m_LevelNumber, 0.30f);
         if (levelCount >= 3)
         {
             Background.loadContent(Content, 3, 1);
         }
         else
         {
             Background.loadContent(Content, levelCount, 1);
         }
     }
 }