public LevelManager(IServiceProvider serviceProvider, GraphicsDeviceManager graphics) { ServiceProvider = serviceProvider; Graphics = graphics; Levels = new List <GenericLevelMethods>(); Levels[0] = new Level1(serviceProvider, graphics); }
public void LoadLevel(int levelToLoad) { switch (levelToLoad) { case 1: Level1 level = new Level1(ServiceProvider, Graphics); break; } }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); level1 = new Level1(Content.ServiceProvider, graphics); PlayerTexture = Content.Load <Texture2D>("character"); SpriteFont = Content.Load <SpriteFont>("File"); Player.InitializePlayer(PlayerTexture, Position, SpriteFont, graphics); // TODO: use this.Content to load your game content here }