Exemplo n.º 1
0
        //loadContent
        private void LoadContent()
        {
            this.Arial = this.levelEditorScene.Game.Content.Load<SpriteFont>(@"PlayScene\Fonts\Arial");
             this.levelEditorButtons = new List<Picture>();
             this.levelEditorAssets = new List<Picture>();
             //levelnumber verlagen
             this.levelEditorButtons.Add(
                 new Picture(this.levelEditorScene.Game, @"LevelEdit\Left",
                     this.position + new Vector2(2.5f * 32f, 0f)));
             //levelnumber verhogen
             this.levelEditorButtons.Add(
                 new Picture(this.levelEditorScene.Game, @"LevelEdit\Right",
                     this.position + new Vector2(4.5f * 32f, 0f)));

             //plaatje wisselen naar beneden in list
             this.levelEditorButtons.Add(
                 new Picture(this.levelEditorScene.Game, @"LevelEdit\Left",
                     this.position + new Vector2(9f * 32f, 0f)));
             //plaatje wisselen naar omhoog in list
             this.levelEditorButtons.Add(
                 new Picture(this.levelEditorScene.Game, @"LevelEdit\Right",
                     this.position + new Vector2(11f * 32f, 0f)));
             //save
             this.levelEditorButtons.Add(
                 new Picture(this.levelEditorScene.Game, @"LevelEdit\Button_load",
                     this.position + new Vector2(15f * 32f, 0f)));

             //Assets toevoegen aan de list levelEditorAssets
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"PlayScene\Blocks\Block",
                                                     this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"PlayScene\Blocks\Door",
                                                     this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"PlayScene\Blocks\Wall1",
                                                     this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"PlayScene\Blocks\Wall2",
                                                     this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"LevelEdit\Beetle",
                                                     this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"LevelEdit\Scorpion",
                                                     this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"LevelEdit\mummy",
                                                     this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"LevelEdit\Potion",
                                                    this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"LevelEdit\Scarab",
                                                    this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"LevelEdit\Treasure1",
                                                    this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"LevelEdit\Treasure2",
                                                    this.position + new Vector2(10f * 32f, 0f)));
             this.levelEditorAssets.Add(new Picture(this.levelEditorScene.Game, @"PlayScene\Panel\Lives",
                                                    this.position + new Vector2(10f * 32f, 0f)));
             this.background = new Picture(this.levelEditorScene.Game, @"LevelEdit\Panel", this.position);
        }
Exemplo n.º 2
0
 //Constructor
 public LevelNextLevel(Level level)
 {
     this.level = level;
     this.gameOver = new Picture(level.Game, @"PlayScene\Overlay\LevelNextLevel", Vector2.Zero);
 }
Exemplo n.º 3
0
 //Constructor
 public LevelEndGame(Level level)
 {
     this.level = level;
     this.background = new Picture(this.level.Game, @"PlayScene\Background\Background2", Vector2.Zero);
     this.congratulations = new Picture(this.level.Game, @"PlayScene\Background\Congratulation", new Vector2(120f, 100f));
 }
Exemplo n.º 4
0
        private Block LoadBlock(char blockElement,int x,int y)
        {
            switch (blockElement)
               {
               case 'a':
                   this.treasures.Add(new Treasure('a',this.game, @"PlayScene\Tressures\Treasure1",new Vector2(x,y)));
                   return new Block(this.game, @"Transparant", new Vector2(x,y), BlockColision.Pas, 'a');

               case 'b':
                   this.treasures.Add(new Treasure('b',this.game, @"PlayScene\Tressures\Treasure2", new Vector2(x, y)));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'b');

               case 'c':
                   this.treasures.Add(new Treasure('c',this.game, @"PlayScene\Tressures\Potion", new Vector2(x, y)));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'c');

               case 'd':
                   this.treasures.Add(new Treasure('d',this.game, @"PlayScene\Tressures\Scarab", new Vector2(x, y)));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'd');

               case 'r':
                   this.beetles.Add(new Beetle(this.game, new Vector2(x, y), 2));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'r');

               case 'M':
                   this.mummys.Add(new Mummy(this.game, new Vector2(x, y), 2.0f));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'M');

               case 's':
                   this.scorpions.Add( new Scorpion(this.game, new Vector2(x,y),2));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 's');

               case 'w':
                   return new Block(this.game, @"Block", new Vector2(x,y),BlockColision.Npas,'w');

               case 'y':
                   return new Block(this.game, @"Door", new Vector2(x, y), BlockColision.Npas, 'y');

               case 'x':
                   return new Block(this.game, @"Wall1", new Vector2(x, y), BlockColision.Npas, 'x');

               case 'z':
                   return new Block(this.game, @"Wall2", new Vector2(x, y), BlockColision.Npas, 'z');

               case 'P':
                   this.player = new Player(this.game,new Vector2(x,y),3.0f);
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'P');

               case '.':
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, '.');

                case '@':
                   this.background = new Picture(this.game, @"PlayScene\Background\Background2",new Vector2(x,y));
                   return new Block(this.game, @"Wall1", new Vector2(x, y), BlockColision.Npas, '@');

               default:
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, '.');

               }
        }
Exemplo n.º 5
0
 //loadContent
 private void Loadcontent()
 {
     this.start = new Picture(this.game, "Buttons\\Button_start", new Vector2(this.left, this.top));
     this.load = new Picture(this.game, "Buttons\\Button_load", new Vector2(this.left + this.space, this.top));
     this.leveledit = new Picture(this.game, "Buttons\\Button_leveleditor", new Vector2(this.left + this.space * 2, this.top));
     this.score = new Picture(this.game, "Buttons\\Button_scores", new Vector2(this.left + this.space * 3, this.top));
     this.help = new Picture(this.game, "Buttons\\Button_help", new Vector2(this.left + this.space * 4, this.top));
     this.quit = new Picture(this.game, "Buttons\\Button_quit", new Vector2(this.left + this.space * 5, this.top));
 }
Exemplo n.º 6
0
 //Constructor
 public LevelPause(Level level)
 {
     this.level = level;
     this.overlay = new Picture(level.Game, @"PlayScene\Overlay\overlay", Vector2.Zero);
 }
Exemplo n.º 7
0
 //Constructor
 public LevelGameOver(Level level)
 {
     this.level = level;
     this.gameOver = new Picture(level.Game, @"PlayScene\Overlay\GameOverOverlay", Vector2.Zero);
 }