title: Loading content in different levels
body: <p>I am building an XNA game and I have used this method to create new levels.<br>
  First I make an abstract class called <code>Level</code>:  </p>
  
  <pre><code>public abstract class Level {
      public abstract void Update(GameTime gameTime);
      public abstract void Draw(SpriteBatch spriteBatch);
  }
  </code></pre>
  
  <p>In the Game1 object, I declare a <code>public static Level currentLevel;</code><br>
  and after initialising it (Like : <code>currentLevel = new GameLevel()</code>), call it's update and draw methods in the <code>Game1.Update</code> and <code>Game1.Draw</code>.  When I want to change the level, I do <code>Game1.currentLevel = new RandomLevel()</code>
  I load my textures for all my levels in <code>Game1.LoadContent</code> by calling the <code>static Load</code> method in my levels.<br>
  My actual levels look like this:</p>
  
  <pre><code>class GameLevel : Level {
  
      Background sky = new Background(new Vector2(0, 0), -0.2f);
      Background land = new Background(new Vector2(0, 0), -0.2f);
      public static void Load()
      {
          ...
      }
  
      public override void Update(GameTime gameTime)
      {
          ...
      }
      public override void Draw(SpriteBatch spriteBatch)
      {
          ...
      }
  }
  </code></pre>
  
  <p><strong>My problem:</strong><br>
  If my textures are static in the levels, I can load them in my static Load method which I call in the <code>Game1.LoadContent</code>. It works fine only if there are static textures(In fact, It works like that in my other levels). But in this level, I have a normal background objects. So I can't call <code>sky.Load</code> and <code>land.Load</code> in a static method. I want to create a lot of backgrounds with different textures. So how do I load the texture for my each of my background objects at the start of the <code>GameLevel</code>?<br>
  I was thinking of using a <code>DrawableGameComponent</code> and inherit it in <code>GameLevel</code> but I can't. Because I already inherited <code>Level</code>. I also got to know that <code>GameComponent</code>s are deprecated.</p>