Example #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
        public StartScreen(Game1 game)
        {
            this.game = game;
            texture = game.Content.Load<Texture2D>("StartScreen");
            mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
            lastState = Keyboard.GetState();

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

             infosrect = new Rectangle(680, 408, 48, 48); // bouton interrogation --> credit
            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(58, 25, 48, 48);

            lumrect = new Rectangle(680, 25, 48, 48); // Tuto mettre sur la page gameplayscreen
            lumtext = game.Content.Load<Texture2D>("lampb");

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

            soundofftext = game.Content.Load<Texture2D>("musicoff");
            varsound = true;
        }
Example #3
0
 public void RegisterString(Vector2 vec, GameTime gt, int stringToDisp, Game1 g)
 {
     game = g;
     positionList.Add(vec);
     strings.Add(stringToDisp);
     gameTimes.Add(gt.TotalGameTime.TotalMilliseconds);
     if (stringToDisp < 0)
         addScore = false;
 }
 public ChooseWorldScreen(Game1 game)
 {
     this.game = game;
     texture = game.Content.Load<Texture2D>("selectworld");
     mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
     world1rect = new Rectangle(185, 48, 143, 159);
     world2rect = new Rectangle(444, 81, 141, 155);
     world3rect = new Rectangle(200, 258, 134, 166);
     backbuttonw = new Rectangle(44, 16, 60, 56);
 }
 public LoadingScreen(Game1 game)
 {
     this.game = game;
     background = game.Content.Load<Texture2D>("blackblack");
     t1 = game.Content.Load<Texture2D>("g5581");
     t2 = game.Content.Load<Texture2D>("g5585");
     t3 = game.Content.Load<Texture2D>("g5589");
     t4 = game.Content.Load<Texture2D>("g5593");
     mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
 }
 public ChooseLevelScreen3(Game1 game)
 {
     this.game = game;
     texture = game.Content.Load<Texture2D>("selectlevel");
     mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
     level1rect = new Rectangle(120, 63, 73, 87);
     level2rect = new Rectangle(230, 83, 80, 87);
     level3rect = new Rectangle(340, 54, 80, 87);
     backbutton = new Rectangle(44, 16, 60, 56);
     startbutton = (game.Content.Load<Texture2D>("t1"));
 }
        // 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);
        }
Example #8
0
        public TutoScreen(Game1 game)
        {
            this.game = game;
            texture = game.Content.Load<Texture2D>("pagina2");
            mainFrame = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
            lastState = Keyboard.GetState();

            // definition des buttons :
            startbrect = new Rectangle(44, 16, 60, 56);
            startbtext = game.Content.Load<Texture2D>("backb");
            folbtext = game.Content.Load<Texture2D>("otherside");
            folrect = new Rectangle(696, 16, 60, 56);
            pagina2 = game.Content.Load<Texture2D>("Tuto");
            pagina = false;
        }
        // s'occuper de faire la page de fin
        public CreditScreen(Game1 game)
        {
            this.game = game;
            background = game.Content.Load<Texture2D>("CreditScreen");
            Mainframe = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);

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

            creditrect = new Rectangle(680, 25, 50, 50); // bouton I Qui a trvailler sur le projet a mettre a la suite de credit ?
            textcredit = game.Content.Load<Texture2D>("infob");

            _font = game.Content.Load<SpriteFont>("ForScore");
            bolos = false;
            background2 = game.Content.Load<Texture2D>("CreditScreen2");
            Current = Screen.CreditScreen;
        }
Example #10
0
 // s'occuper de faire la page de fin
 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);
     textbutpl = game.Content.Load<Texture2D>("bplay");
     KeepPlayin = new Rectangle(355, 290, 80, 80);
     textgobackb = game.Content.Load<Texture2D>("backb");
     Gobackbut = new Rectangle(44, 16, 60, 56);
     _font = game.Content.Load<SpriteFont>("ForScore");
     bracketRect = new Rectangle(190, 110, 150, 40);
     bracket = game.Content.Load<Texture2D>("panier");
     bracketRect2 = new Rectangle(190, 170, 150, 40);
     Starship1 = game.Content.Load<Texture2D>("13star");
     Starship2 = game.Content.Load<Texture2D>("23star");
     Starship3 = game.Content.Load<Texture2D>("33star");
     Troopers = new Rectangle(450, 130, 150, 70);
 }