Example #1
0
        public override void Initialize()
        {
            Vector2       position = new Vector2(640, 605);
            BoutonTextuel bouton   = new BoutonTextuel(Jeu, position, ESPACES, "Arial", Color.Black, Color.Black, Scènes.MenuPrincipal, SceneManager);

            ListeDesÉléments.Add(bouton);
            base.Initialize();
        }
Example #2
0
        private void ChangePlayButton(BoutonTextuel boutonCliqué)
        {
            int i = ListeDesÉléments.IndexOf(boutonCliqué);

            ListeDesÉléments.Remove(boutonCliqué);
            boutonCliqué.Clicked -= new ButtonClickedEventHandler(ChangePlayButton);
            BoutonTextuel boutonresume = new BoutonTextuel(Jeu, new Vector2(300, 450), "Reprendre", "TrajanusRomanBold60", Color.Black, Color.Red, Scènes.Jeu, SceneManager);

            ListeDesÉléments.Insert(i, boutonresume);
            boutonresume.Initialize();
        }
Example #3
0
        // Add() components
        public override void Initialize()
        {
            ListeDesÉléments.Add(new AfficheurFPS(Jeu, "Arial"));

            for (int i = 1; i < NB_CHOIX + 1; ++i)
            {
                ListeDesÉléments.Add(new BoutonTextuel(Jeu, new Vector2(Jeu.Window.ClientBounds.Width / 2, (float)((Jeu.Window.ClientBounds.Height * i + HAUTEUR_CHOIX) / (NB_CHOIX + 1))), "Baldor Le Brave - Magicien", "FuturaLT60", Color.Azure, Color.CadetBlue, Scènes.Jeu, SceneManager));
            }
            Soundtrack.StartSongCue("m_menu");

            base.Initialize();
        }
Example #4
0
        // Add() components
        public override void Initialize()
        {
            ListeDesÉléments.Add(new AfficheurFPS(Jeu, "Arial"));
            BoutonTextuel playbutton = new BoutonTextuel(Jeu, new Vector2(350, 450), "Débuter la partie", "TrajanusRomanBold60", Color.Black, Color.Red, Scènes.CharacterSelection, SceneManager);

            ListeDesÉléments.Add(playbutton);
            playbutton.Clicked += new ButtonClickedEventHandler(ChangePlayButton);
            ListeDesÉléments.Add(new BoutonTextuel(Jeu, new Vector2(300, 600), "Options", "TrajanusRomanBold60", Color.Black, Color.Red, Scènes.MenuOptions, SceneManager));

            Soundtrack.StartSongCue("m_menu");

            base.Initialize();
        }
Example #5
0
        // Add() components
        public override void Initialize()
        {
            int volumeInitialMusique = 75;
            int volumeInitialSons    = 75;

            BoutonMusique    = new BoutonRéglage(Jeu, volumeInitialMusique, new Vector2(550, 400), "Volume Musique", "EagleSans48", Color.Black, Color.Red, SceneManager);
            BoutonSons       = new BoutonRéglage(Jeu, volumeInitialSons, new Vector2(550, 500), "Volume Sons", "EagleSans48", Color.Black, Color.Red, SceneManager);
            BoutonFullScreen = new BoutonBool(Jeu, new Vector2(550, 600), 'x', "Full screen", "EagleSans48", Color.Black, Color.Red, SceneManager);

            ListeDesÉléments.Add(new AfficheurFPS(Jeu, "Arial"));

            ListeDesÉléments.Add(new BoutonTextuel(Jeu, new Vector2(200, 200), "Retour", "TrajanusRoman60", Color.Black, Color.Snow, Scènes.MenuPrincipal, SceneManager));
            ListeDesÉléments.Add(BoutonMusique);
            ListeDesÉléments.Add(BoutonSons);
            ListeDesÉléments.Add(BoutonFullScreen); // 0.01 correct; 0.001 trop

            AjusterVolume(volumeInitialMusique, volumeInitialSons);

            base.Initialize();
        }
Example #6
0
        // Add() components
        public override void Initialize()
        {
            Scale = new Vector2((float)Jeu.Window.ClientBounds.Width / RÉSOLUTION_PAR_DÉFAUT_X, (float)Jeu.Window.ClientBounds.Height / RÉSOLUTION_PAR_DÉFAUT_Y);
            Vector3 positionCaméra = new Vector3(300, 70, -10);

            TexturesSkybox = new List <string[]>();
            string[] TexturesTerrain = new string[] { "Terrain\\Grass",
                                                      "Terrain\\Snow",
                                                      "Terrain\\Sand",
                                                      "Terrain\\Lava",
                                                      "Terrain\\Lava" };
            FogData[] fogData = new FogData[] { new FogData(new Vector3(0.7f, 1f, 0.8f), 30, 450),
                                                new FogData(new Vector3(0.3f, 0.3f, 0.35f), 30, 450),
                                                new FogData(new Vector3(1f, 0.8f, 0.1f), -200, 1500),
                                                new FogData(new Vector3(1f, 0.6f, 0.1f), 20, 450),
                                                new FogData(new Vector3(0.70f, 0.32f, 0.0f), 10, 420) };

            List <string> listNomMusic = new List <string>()
            {
                "m_act1", "m_act2", "m_act3", "m_act4", "m_act4"
            };


            TexturesSkybox.Add(new string[] { "DarkBox\\topdark",
                                              "DarkBox\\frontdark",
                                              "DarkBox\\backdark",
                                              "DarkBox\\leftdark",
                                              "DarkBox\\rightdark",
                                              "DarkBox\\botdark" });

            string[] SpellIcons = new string[] { "HUD\\Spells\\ChaosBoltButton",
                                                 "HUD\\Spells\\PlasmaFieldButton",
                                                 "HUD\\Spells\\SlowTimeButton",
                                                 "HUD\\Spells\\SpellstealButton" };

            string[] SpellIconsAlt = new string[] { null,
                                                    null,
                                                    "HUD\\Spells\\TimeLockButton",
                                                    null };

            string[] SpellTooltips = new string[] { "Content\\Text\\Firebolt.txt",
                                                    "Content\\Text\\Nova.txt",
                                                    "Content\\Text\\SlowMissiles.txt",
                                                    "Content\\Text\\MindControl.txt" };

            string[] SpellTooltipsAlt = new string[] { null,
                                                       null,
                                                       "Content\\Text\\SlowMissilesAlt.txt",
                                                       null };

            //Vector3 positionCaméra = new Vector3(0, 10, 0);

            GestionInput3D = new InputManager3D(Jeu, this);
            MapManager     = new TerrainManager(Jeu, this, NB_ZONES, new Vector2(ÉTENDUE_MAP, ÉTENDUE_MAP), TexturesTerrain, fogData, GestionnaireDeTextures.Find("Terrain\\heightmap3.0"), listNomMusic);
            BaldorLeBrave  = new Héros(Jeu, this, "dude", 0.2f, 1f,
                                       new Vector3(300, 0, -50), new Vector3(0, MathHelper.PiOver2, 0), new Vector3(0, -MathHelper.PiOver2, 0),
                                       "Baldor Le Brave",
                                       35f, MathHelper.Pi * 4, true,
                                       42, 18, 0, 5, 3, 0.8f,
                                       "nova");
            CaméraJeu = new CaméraThirdPerson(Jeu, GestionInput3D, positionCaméra, BaldorLeBrave, Vector3.Up);
            Box       = new Skybox(Jeu, this, "skybox2", TexturesSkybox[0], new Vector3(0, -1, 0));
            FinalBoss = new Boss(Jeu, this, BaldorLeBrave, "Cyclops\\terrorwurm", 0.2f, ÉCHELLE_BOX_WURM, new Vector3(ÉTENDUE_MAP / 2, 0, -ÉTENDUE_MAP * 4.6f), new Vector3(0, 0, 0), new Vector3(0, -MathHelper.PiOver2, 0), "Demon Grostesque", 30f, MathHelper.Pi * 4, false, 400, 3, 6, 4, 1f, false, 15, 70, 42, 0);

            HeadsUpDisplay   = new HUD(Jeu, this, BaldorLeBrave, "HUD\\HUD", "HUD\\Vie", "HUD\\Mana", "HUD\\Exp", 2.5f, SpellIcons, SpellIconsAlt, "HighTowerText", "HUD\\TextBackground", SpellTooltips, SpellTooltipsAlt);
            ProjManager      = new ProjectileManager(Jeu, this, "OrangeBall", 0.01f);
            MonstManager     = new MonsterManager(Jeu, this);
            CollisionManager = new CollisionManager(Jeu, this);
            BarresManager    = new HealthBarManager(Jeu, this, "HUD\\healthbar", "HUD\\healthbarbg", "Stroke");
            NovManager       = new NovaManager(Jeu, this);
            DoodManager      = new DoodadManager(Jeu, this);


            ListeDesÉléments.Add(GestionInput3D);
            ListeDesÉléments.Add(new Afficheur3D(Jeu));

            ListeDesÉléments.Add(CaméraJeu);
            ListeDesÉléments.Add(Box);
            ListeDesÉléments.Add(MapManager);

            ListeDesÉléments.Add(BaldorLeBrave);
            ListeDesÉléments.Add(MonstManager);

            ListeDesÉléments.Add(FinalBoss);
            ListeDesÉléments.Add(ProjManager);
            ListeDesÉléments.Add(NovManager);
            ListeDesÉléments.Add(DoodManager);
            ListeDesÉléments.Add(CollisionManager);
            ListeDesÉléments.Add(HeadsUpDisplay);
            //ListeDesÉléments.Add(ExpBar);
            ListeDesÉléments.Add(BarresManager);
            ListeDesÉléments.Add(new AfficheurFPS(Jeu, "Arial"));



            base.Initialize();


            CréerDoodads();
            CréerMonstres();
        }