Exemplo n.º 1
0
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemplo n.º 2
0
        public MainMenu(Game1 game, float startTime)
            : base(game)
        {
            // Constructeur:
            volume_sons = 0.6f;
            english = false;
            time = startTime;
            started = false;
            paused = false;
            finished = false;
            boss_appeared = false;
            has_Lost = false;
            boss_already_appeared = false;
            Boss_dead_instance = Resources.boss_mort_sound.CreateInstance();
            total_piece_updated = false;
            Text = "0";
            nb_pieces = 0;
            mort_enemies = Resources.enemies_sound.CreateInstance();
            piece_font = Resources.piece_font;
            piece_text = " 0";

            //Ajout des boutons nécessaires

            Intro.Add(new GUIElement(@"Sprites\Menu\Intro\Intro2_Fond"));
            Intro.Add(new GUIElement(@"Sprites\Menu\Intro\Intro_Fond"));

            main.Add(new GUIElement(@"Sprites\Menu\English\Bouton_jouer"));
            main.Add(new GUIElement(@"Sprites\Menu\English\Bouton_quitter"));
            main.Add(new GUIElement(@"Sprites\Menu\Francais\Button_jouer"));
            main.Add(new GUIElement(@"Sprites\Menu\Francais\Button_options"));
            main.Add(new GUIElement(@"Sprites\Menu\Francais\Button_quitter"));
            main.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Credits"));

            InOptions.Add(new GUIElement(@"Sprites\Menu\English\Bouton_Bruitages"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Desinstaller"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\English\Uninstall"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\English\Bouton_Retour"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\English\Bouton_PleinEcran"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\English\Bouton_Commandes"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\English\Bouton_French"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Retour"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Volume"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Plus"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Moins"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Bruitages"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Plus2"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Moins2"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Commandes"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_PleinEcran"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Anglais"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Website"));
            InOptions.Add(new GUIElement(@"Sprites\Menu\English\Bouton_Website"));

            InPause.Add(new GUIElement(@"Sprites\Menu\English\Bouton_Continuer"));
            InPause.Add(new GUIElement(@"Sprites\Menu\English\Bouton_quitter"));
            InPause.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Continuer"));
            InPause.Add(new GUIElement(@"Sprites\Menu\Francais\Button_options"));
            InPause.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_MenuPrincipalGros"));
            InPause.Add(new GUIElement(@"Sprites\Menu\Francais\Button_quitter"));

            HowToPlay.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_RetourToOptions"));
            HowToPlay.Add(new GUIElement(@"Sprites\Menu\English\Bouton_RetourToOptions"));

            SelectionMap.Add(new GUIElement(@"Sprites\Menu\English\Bouton_NouvellePartie"));
            SelectionMap.Add(new GUIElement(@"Sprites\Menu\English\Bouton_Multijoueur"));
            SelectionMap.Add(new GUIElement(@"Sprites\Menu\English\Bouton_Retour"));
            SelectionMap.Add(new GUIElement(@"Sprites\Menu\English\Bouton_Chapitres"));
            SelectionMap.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_NouvellePartie"));
            SelectionMap.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Multijoueur"));
            SelectionMap.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Retour"));
            SelectionMap.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Chapitres"));

            GameOver.Add(new GUIElement(@"Sprites\Menu\Francais\Boutton_Rejouer"));
            GameOver.Add(new GUIElement(@"Sprites\Menu\English\Boutton_Rejouer"));
            GameOver.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_MenuPrincipal"));

            Credits.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Retour"));
            Credits.Add(new GUIElement(@"Sprites\Menu\English\Bouton_Retour"));

            Won.Add(new GUIElement(@"Sprites\Menu\English\Bouton_NiveauSuivant"));
            Won.Add(new GUIElement(@"Sprites\Menu\English\Boutton_Rejouer"));
            Won.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_NiveauSuivant"));
            Won.Add(new GUIElement(@"Sprites\Menu\Francais\Boutton_Rejouer"));
            Won.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_MenuPrincipal"));

            GameEnded.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Credits"));
            GameEnded.Add(new GUIElement(@"Sprites\Menu\Francais\Boutton_Rejouer"));
            GameEnded.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_MenuPrincipal"));
            GameEnded.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_Boutique"));

            Chapitre1.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_RetourToJouer"));
            Chapitre1.Add(new GUIElement(@"Sprites\Menu\Francais\Level1"));
            Chapitre1.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_droite"));
            Chapitre1.Add(new GUIElement(@"Sprites\Menu\English\Bouton_RetourToJouer"));

            Chapitre2.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_RetourToJouer"));
            Chapitre2.Add(new GUIElement(@"Sprites\Menu\Francais\Level2"));
            Chapitre2.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_droite2"));
            Chapitre2.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_gauche"));
            Chapitre2.Add(new GUIElement(@"Sprites\Menu\English\Bouton_RetourToJouer"));

            Chapitre3.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_RetourToJouer"));
            Chapitre3.Add(new GUIElement(@"Sprites\Menu\Francais\Level3"));
            Chapitre3.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_droite3"));
            Chapitre3.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_gauche2"));
            Chapitre3.Add(new GUIElement(@"Sprites\Menu\English\Bouton_RetourToJouer"));

            Chapitre4.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_RetourToJouer"));
            Chapitre4.Add(new GUIElement(@"Sprites\Menu\Francais\Level4"));
            Chapitre4.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_droite4"));
            Chapitre4.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_gauche3"));
            Chapitre4.Add(new GUIElement(@"Sprites\Menu\English\Bouton_RetourToJouer"));

            Chapitre5.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_RetourToJouer"));
            Chapitre5.Add(new GUIElement(@"Sprites\Menu\Francais\Level5"));
            Chapitre5.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_droite5"));
            Chapitre5.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_gauche4"));
            Chapitre5.Add(new GUIElement(@"Sprites\Menu\English\Bouton_RetourToJouer"));

            Chapitre6.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_RetourToJouer"));
            Chapitre6.Add(new GUIElement(@"Sprites\Menu\Francais\Level6"));
            Chapitre6.Add(new GUIElement(@"Sprites\Menu\Francais\fleche_gauche5"));
            Chapitre6.Add(new GUIElement(@"Sprites\Menu\English\Bouton_RetourToJouer"));

            player1win.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_MenuPrincipal"));
            player2win.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_MenuPrincipal"));

            ChooseIp.Add(new GUIElement(@"Sprites\Menu\Francais\Bouton_RetourToJouer"));
            ChooseIp.Add(new GUIElement(@"Sprites\Menu\Francais\EnterIp"));
            ChooseIp.Add(new GUIElement(@"Sprites\Menu\Francais\Ok"));

            ip = "";
            player = Global.Player;
            player2 = Global.Player;
            player3 = Global.Player;
            player4 = Global.Player;
            player5 = Global.Player;
            player6 = Global.Player;
            p7 = Global.Player;
            p8 = Global.Player;
            Main = Global.GameMain;
            Main2 = Global.GameMain2;
            Main3 = Global.GameMain3;
            Main4 = Global.GameMain4;
            Main5 = Global.GameMain5;
            Main6 = Global.GameMain6;
            MainMulti = Global.GameMainMulti;
            Global.MainMenu = this;
        }