/// <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 Hero_afbeeldingR = Content.Load <Texture2D>("charx25R"); Hero_afbeeldingL = Content.Load <Texture2D>("charx25L"); _hero = new Hero(Hero_afbeeldingR, Hero_afbeeldingL); Enemy_afbeeldingL = Content.Load <Texture2D>("Enemyx2L"); Enemy_afbeeldingR = Content.Load <Texture2D>("Enemyx2R"); _Enemys.Add(new Enemy(Enemy_afbeeldingR, Enemy_afbeeldingL, 801, 365, 800, 1050)); _Enemys.Add(new Enemy(Enemy_afbeeldingR, Enemy_afbeeldingL, 1721, 365, 1720, 2150)); _Enemys.Add(new Enemy(Enemy_afbeeldingR, Enemy_afbeeldingL, 2149, 650, 1900, 2350)); _Enemys.Add(new Enemy(Enemy_afbeeldingR, Enemy_afbeeldingL, 3191, 365, 3190, 3290)); _EnemysLvl2.Add(new Enemy(Enemy_afbeeldingR, Enemy_afbeeldingL, 1, 436, 0, 220)); _EnemysLvl2.Add(new Enemy(Enemy_afbeeldingR, Enemy_afbeeldingL, 659, 580, 410, 660)); _EnemysLvl2.Add(new Enemy(Enemy_afbeeldingR, Enemy_afbeeldingL, 831, 436, 830, 1100)); _EnemysLvl2.Add(new Enemy(Enemy_afbeeldingR, Enemy_afbeeldingL, 1350, 82, 1340, 1650)); _EnemysLvl2.Add(new Enemy(Enemy_afbeeldingR, Enemy_afbeeldingL, 2621, 580, 2620, 2870)); MovingTile_afbeelding = Content.Load <Texture2D>("TileMove"); movingTiles.Add(new MovingTilesLeftRight(MovingTile_afbeelding, 1201, 200, 1200, 1500)); movingTiles.Add(new MovingTilesUpDown(MovingTile_afbeelding, 675, 496, 497, 600)); movingTiles.Add(new MovingTilesLeftRight(MovingTile_afbeelding, 3409, 300, 3408, 3800)); movingTiles_Lvl2.Add(new MovingTilesUpDown(MovingTile_afbeelding, 1200, 200, 199, 700)); movingTiles_Lvl2.Add(new MovingTilesLeftRight(MovingTile_afbeelding, 2050, 700, 2051, 2500)); movingTiles_Lvl2.Add(new MovingTilesLeftRight(MovingTile_afbeelding, 5001, 500, 5000, 6100)); coin_afbeelding = Content.Load <Texture2D>("coin2"); coins.Add(new coin(coin_afbeelding, 295, 210)); coins.Add(new coin(coin_afbeelding, 690, 300)); coins.Add(new coin(coin_afbeelding, 1500, 150)); coins.Add(new coin(coin_afbeelding, 1900, 220)); coins.Add(new coin(coin_afbeelding, 50, 550)); #region coins secret coins_SecretLvl.Add(new coin(coin_afbeelding, 110, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 190, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 270, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 350, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 430, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 510, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 590, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 670, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 750, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 830, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 910, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 990, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1070, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1150, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1230, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1310, 75)); coins_SecretLvl.Add(new coin(coin_afbeelding, 110, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 190, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 270, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 350, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 430, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 510, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 590, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 670, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 750, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 830, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 910, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 990, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1070, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1150, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1230, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1310, 285)); coins_SecretLvl.Add(new coin(coin_afbeelding, 110, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 190, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 270, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 350, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 430, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 510, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 590, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 670, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 750, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 830, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 910, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 990, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1070, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1150, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1230, 495)); coins_SecretLvl.Add(new coin(coin_afbeelding, 1310, 495)); #endregion coins_Lvl2.Add(new coin(coin_afbeelding, 0, 300)); coins_Lvl2.Add(new coin(coin_afbeelding, 220, 300)); coins_Lvl2.Add(new coin(coin_afbeelding, 2494, 160)); coins_Lvl2.Add(new coin(coin_afbeelding, 2210, 300)); coins_Lvl2.Add(new coin(coin_afbeelding, 1700, 400)); coins_Lvl2.Add(new coin(coin_afbeelding, 1920, 400)); exitTile = Content.Load <Texture2D>("exitTile"); exit_SecretLvl = new ExitTile(exitTile, new Vector2(1310, 650)); exit_Lvl1 = new ExitTile(exitTile, new Vector2(4680, 640)); exit_Lvl2 = new ExitTile(exitTile, new Vector2(6800, 640)); font = Content.Load <SpriteFont>("Score"); fireTile = Content.Load <Texture2D>("SpecialTile"); fire = new SpecialTile(fireTile, new Vector2(3110, 650)); bullet_afbeeldingRechts = Content.Load <Texture2D>("bulletSprite2"); bullet_afbeeldingLinks = Content.Load <Texture2D>("bulletSprite2L"); EndBoss_afbeelding = Content.Load <Texture2D>("bowser"); endBoss = new EndBoss(EndBoss_afbeelding); kanon_afbeelding = Content.Load <Texture2D>("Canon"); kanon = new Kanon(kanon_afbeelding, new Vector2(4540, 450)); Kannonen.Add(kanon); Kannonen.Add(new Kanon(kanon_afbeelding, new Vector2(4000, 660))); Kannonen.Add(new Kanon(kanon_afbeelding, new Vector2(4825, 590))); kanonBullet_afbeelding = Content.Load <Texture2D>("BowserBullet"); background = Content.Load <Texture2D>("hillsbackground"); mainframe = new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height); //TODO exit tile op scherm laten zien Tiles.Content = Content; map.Generate(new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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