Exemple #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here

            levelManager = new UC_LevelManager();

            levelManager.AddLevel(0, new mainmenu());
            levelManager.getLevel(0).InitializeLevel(GraphicsDevice, Content, levelManager);
            levelManager.getLevel(0).LoadContent();
            levelManager.setLevel(0);

            levelManager.AddLevel(1, new secondmenu());
            levelManager.getLevel(1).InitializeLevel(GraphicsDevice, Content, levelManager);
            levelManager.getLevel(1).LoadContent();

            levelManager.AddLevel(2, new thirdmenu());
            levelManager.getLevel(2).InitializeLevel(GraphicsDevice, Content, levelManager);
            levelManager.getLevel(2).LoadContent();

            levelManager.AddLevel(3, new fourthmenu());
            levelManager.getLevel(3).InitializeLevel(GraphicsDevice, Content, levelManager);
            levelManager.getLevel(3).LoadContent();

            levelManager.AddLevel(4, new fifthmenu());
            levelManager.getLevel(4).InitializeLevel(GraphicsDevice, Content, levelManager);
            levelManager.getLevel(4).LoadContent();
        }
Exemple #2
0
 public virtual void InitializeLevel(GraphicsDevice g, ContentManager c, UC_LevelManager lm)
 {
     gd = g;
     spriteBatch = new SpriteBatch(g);
     //renderer = new Renderer(g);
     Content = c;
     levelManager = lm;
 }