public Scene2(BasicFile the_file) : base(the_file)
 {
     BasicSprite.SetBoundaries(new Viewport(new Rectangle(0, 0, width, height)));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(true, 2));
     the_enemies.Add(new Enemy(true, 2));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(true, 2.5));
     the_enemies.Add(new Enemy(true, 2.5));
     the_enemies.Add(new Enemy(true, 2.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_enemies.Add(new Enemy(false, 1.5));
     the_boxes.Add(new Box(new Rectangle(1702, 390, 90, 90), Color.SaddleBrown));
     the_boxes.Add(new Box(new Rectangle(1702, 500, 90, 90), Color.SaddleBrown));
     the_boxes.Add(new Box(new Rectangle(292, 808, 90, 90), Color.SaddleBrown));
     the_boxes.Add(new Box(new Rectangle(292, 908, 90, 90), Color.SaddleBrown));
 }
Exemple #2
0
        public Scene3(BasicFile the_file) : base(the_file)
        {
            int widthSectionSize = width / 9;

            the_buttons.Add(new Button(new Rectangle(widthSectionSize - buttonWidth / 2, 0, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize - buttonWidth / 2, height / 2 - buttonHeight / 2, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize - buttonWidth / 2, height - buttonHeight, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize * 3 - buttonWidth / 2, 0, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize * 3 - buttonWidth / 2, height / 2 - buttonHeight / 2, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize * 3 - buttonWidth / 2, height - buttonHeight, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize * 5 - buttonWidth / 2, 0, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize * 5 - buttonWidth / 2, height / 2 - buttonHeight / 2, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize * 5 - buttonWidth / 2, height - buttonHeight, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize * 7 - buttonWidth / 2, 0, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize * 7 - buttonWidth / 2, height / 2 - buttonHeight / 2, buttonWidth, buttonHeight)));
            the_buttons.Add(new Button(new Rectangle(widthSectionSize * 7 - buttonWidth / 2, height - buttonHeight, buttonWidth, buttonHeight)));
            BasicSprite.SetBoundaries(new Viewport(new Rectangle(0, 0, 2100, 1620)));
        }
 public Scene1(BasicFile the_file) : base(the_file)
 {
     the_enemies.Add(new Enemy(true, 2.5));
     the_enemies.Add(new Enemy(false, 2.5));
     the_enemies.Add(new Enemy(true, 2.5));
     the_enemies.Add(new Enemy(false, 2.5));
     the_enemies.Add(new Enemy(true, 2.5));
     the_enemies.Add(new Enemy(false, 2.5));
     the_enemies.Add(new Enemy(true, 2.5));
     the_enemies.Add(new Enemy(false, 2.5));
     the_enemies.Add(new Enemy(true, 2.5));
     the_enemies.Add(new Enemy(false, 2.5));
     the_boxes.Add(new Box(new Rectangle(100, 300, boxSide, boxSide), Color.White));  ///left box
     the_boxes.Add(new Box(new Rectangle(1900, 300, boxSide, boxSide), Color.White)); ///right box
     the_boxes.Add(new Box(new Rectangle(900, 100, boxSide, boxSide), Color.White));  ///up box
     the_boxes.Add(new Box(new Rectangle(900, 1500, boxSide, boxSide), Color.White)); ///down box
     BasicSprite.SetBoundaries(new Viewport(new Rectangle(0, 0, 2100, 1620)));
 }
Exemple #4
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            BasicSprite.SetBoundaries(new Viewport(new Rectangle(0, 0, 2100, 1620)));
            graphics.PreferredBackBufferWidth  = windowWidth;
            graphics.PreferredBackBufferHeight = windowHeight;
            graphics.ApplyChanges();
            Scene.setViewport(GraphicsDevice.Viewport);
            BasicGUIButton.SetLimitForNextPressing(0.1);
            the_menu = new Menu(the_file);
            //scene2 = new Scene2();
            //the_game_over_menu = new GameOver();
            //scene1 = new Scene1();
            //scene2 = new Scene2();
            //scene3 = new Scene3();
            //graphics.PreferredBackBufferHeight =253 ;
            //graphics.PreferredBackBufferWidth = 320;
            //graphics.ApplyChanges();
            base.Initialize();
        }