Пример #1
0
        // MouseState prevmouse;
        // MouseState curmouse;
        public StartScreen(Game1 game)
        {
            this.game = game;
            texture = game.Content.Load<Texture2D>("StartScreen");
            Widths = game.GraphicsDevice.Viewport.Width;
            Heights = game.GraphicsDevice.Viewport.Height;
            mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
            lastState = Keyboard.GetState();

            // definition des buttons
               // startbrect = new Rectangle(rdnW(370), rdnH(258), rdnW(88), rdnH(88));
            startbrect = new Rectangle(rdnW(370), rdnH(258), rdnW(88), rdnH(88));
            startbtext = game.Content.Load<Texture2D>("bplay");

            infosrect = new Rectangle(rdnW(680), rdnH(408), rdnW(48), rdnH(48)); // forme
            texttuto = game.Content.Load<Texture2D>("interro");

            //  _font = game.Content.Load<SpriteFont>("ForScore");
            bangeo = game.Content.Load<Texture2D>("banfin");

            // to use
            soundtext = game.Content.Load<Texture2D>("soundonb");
            soundrect = new Rectangle(rdnW(58), rdnH(25), rdnW(48), rdnH(48));

            lumrect = new Rectangle(rdnW(680), rdnH(25), rdnW(48), rdnH(48));
            lumtext = game.Content.Load<Texture2D>("lampb");

               // shoprect = new Rectangle(rdnW(147), rdnH(384), rdnW(48), rdnH(48));
               // settingsrect = new Rectangle(rdnW(600), rdnH(408), rdnW(48), rdnH(48));

            soundofftext = game.Content.Load<Texture2D>("musicoff");
            varsound = true;

            current = Screen.StartScreen;
        }
Пример #2
0
 public ChooseWorldScreen(Game1 game)
 {
     this.game = game;
     Widths = game.GraphicsDevice.Viewport.Width;
     Heights = game.GraphicsDevice.Viewport.Height;
     texture = game.Content.Load<Texture2D>("selectworld");
     mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
     world1rect = new Rectangle(rW(185), rH(48), rW(143), rH(159));
     world2rect = new Rectangle(rW(444), rH(81), rW(141), rH(155));
     world3rect = new Rectangle(rW(200), rH(258), rW(134), rH(166));
     backbuttonw = new Rectangle(rW(44), rH(16), rW(60), rH(56));
     current = Screen.ChooseWorldScreen;
 }
Пример #3
0
 public ChooseLevelScreen(Game1 game)
 {
     this.game = game;
     Widths = game.GraphicsDevice.Viewport.Width;
     Heights = game.GraphicsDevice.Viewport.Height;
     texture = game.Content.Load<Texture2D>("selectlevel");
     mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
     level1rect = new Rectangle(rw(120), rh(63), rw(73), rh(87));
     level2rect = new Rectangle(rw(230), rh(83), rw(80), rh(87));
     level3rect = new Rectangle(rw(340), rh(54), rw(80), rh(87));
     backbutton = new Rectangle(rw(44), rh(16), rw(60), rh(56));
     current = Screen.ChooseLevelScreen;
 }
Пример #4
0
        // rajouter pause/screen
        // rajouter checkfor the win
        public GamePlayScreen(Game1 game)
        {
            this.game = game;
            // set background
            mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
               // Envoyer la texture + le nom du fichier XMl
            background = game.Content.Load<Texture2D>(GlobalVar.texture);

            // lancement d'une partie envoie du nom du fichier ou enfonction du button. a voir.
            Current = new Map();
            // pour chemin en fonction du niveau
            Current.Initialize(GlobalVar.xmlfile, game.Content, game.GraphicsDevice);
            timee = 0;
        }
Пример #5
0
        public TutoScreen(Game1 game)
        {
            this.game = game;
            texture = game.Content.Load<Texture2D>("pagina2");
            Widths = game.GraphicsDevice.Viewport.Width;
            Heights = game.GraphicsDevice.Viewport.Height;
            mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
            lastState = Keyboard.GetState();

            // definition des buttons :
            startbrect = new Rectangle(rw(44), rh(16), rw(60), rh(56));
            startbtext = game.Content.Load<Texture2D>("backb");
            folbtext = game.Content.Load<Texture2D>("otherside");
            folrect = new Rectangle(rw(696), rh(16), rw(60), rh(56));
            pagina2 = game.Content.Load<Texture2D>("Tuto");
            pagina = false;
            current = Screen.TutoScreen;
            curmouse = Mouse.GetState();
        }
Пример #6
0
        // FontFile _font
        // s'occuper de faire la page de fin
        public CreditScreen(Game1 game)
        {
            this.game = game;
            Widths = game.GraphicsDevice.Viewport.Width;
            Heights = game.GraphicsDevice.Viewport.Height;
            background = game.Content.Load<Texture2D>("CreditScreen");
            Mainframe = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
            background2 = game.Content.Load<Texture2D>("CreditScreen2");

            textgobackb = game.Content.Load<Texture2D>("backb");
            Gobackbut = new Rectangle(rw(44), rh(16), rw(60), rh(56));

            creditrect = new Rectangle(rw(680), rh(25), rw(50), rh(50));
            textcredit = game.Content.Load<Texture2D>("infob");

            Current = Screen.CreditScreen;
            bolos = false;
               // _font = game.Content.Load<SpriteFont>("ForScore");
              //  _font = FontLoader.Load("ForScore.xml");
        }
Пример #7
0
 // s'occuper de faire la page de fin
 // changer le BPLAY qui retourne sur choose level pas assez d'animation.
 public FinishScreen(Game1 game)
 {
     this.game = game;
     background = game.Content.Load<Texture2D>("endgame");
     Mainframe = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
     Widths = game.GraphicsDevice.Viewport.Width;
     Heights = game.GraphicsDevice.Viewport.Height;
     textbutpl = game.Content.Load<Texture2D>("bplay");
     KeepPlayin = new Rectangle(rw(355), rh(290), rw(80), rh(80));
     textgobackb = game.Content.Load<Texture2D>("backb");
     Gobackbut = new Rectangle(rw(44), rh(16), rw(60), rh(56));
        // _font = game.Content.Load<SpriteFont>("ForScore");
     bracketRect = new Rectangle(rw(190), rh(110), rw(150), rh(40));
     bracket = game.Content.Load<Texture2D>("panier");
     bracketRect2 = new Rectangle(rw(190), rh(170), rw(150), rh(40));
     Starship1 = game.Content.Load<Texture2D>("13star");
     Starship2 = game.Content.Load<Texture2D>("23star");
     Starship3 = game.Content.Load<Texture2D>("33star");
     Troopers = new Rectangle(rw(450), rh(130), rw(150), rh(70));
     Current = Screen.GameOverScreen;
 }