Ejemplo n.º 1
0
        public MoteurAudio(MoteurJeu moteurJeu)
        {
            this.moteurJeu = moteurJeu;

            MediaPlayer.IsRepeating = true;
            songVolume = 100;
            soundVolume = 100;
        }
Ejemplo n.º 2
0
        protected override void Initialize()
        {
            moteurSysteme = new MoteurSysteme();
            moteurPhysique = new MoteurPhysique();
            moteurJeu = new MoteurJeu(moteurSysteme, moteurPhysique);
            moteurAudio = new MoteurAudio(moteurJeu);
            moteurGraphique = new MoteurGraphique(moteurJeu);

            base.Initialize();
        }
Ejemplo n.º 3
0
        public MenuManager(MoteurJeu moteurJeu)
        {
            this.moteurJeu = moteurJeu;

            #region Menu Accueil
            menuAccueilPrincipal = new Menu(null, new Vector2(Constante.WindowWidth / 2 - 100 - 200 - 50, Constante.WindowHeight - 100),
                                   new string[3] { "Reglages", "Nouvelle Partie", "Quitter" }, 200, 40, 250, false);

            menuAccueilReglage = new Menu(menuAccueilPrincipal ,new Vector2(Constante.WindowWidth / 2 - 100, Constante.WindowHeight / 2 - 120),
                                 new string[4] { "Video", "Audio", "Raccourcis", "Retour" }, 200, 40, 60, true);

            menuAccueilVideo = new Menu(menuAccueilReglage, new Vector2(Constante.WindowWidth / 2 - 100, Constante.WindowHeight / 2 - 20),
                                 new string[1] { "Retour" }, 200, 40, 60, true);

            menuAccueilAudio = new Menu(menuAccueilReglage, new Vector2(Constante.WindowWidth / 2 - 100, Constante.WindowHeight / 2 - 60 - 30),
                                 new string[3] { "Musique : 100", "Son : 100", "Retour" }, 200, 40, 60, true);

            menuAccueilRaccourcis = new Menu(menuAccueilReglage, new Vector2(Constante.WindowWidth / 2 - 100, Constante.WindowHeight / 2 - 20),
                                 new string[1] { "Retour" }, 200, 40, 60, true);

            menuActif = menuAccueilPrincipal.Activer();

            menuAccueilPrincipal.AddFils(menuAccueilReglage);

            menuAccueilReglage.AddFils(menuAccueilVideo);
            menuAccueilReglage.AddFils(menuAccueilAudio);
            menuAccueilReglage.AddFils(menuAccueilRaccourcis);
            #endregion

            #region Menu Jeu
            menuPausePrincipal = new Menu(null, new Vector2(Constante.WindowWidth / 2 - 100, Constante.WindowHeight / 2 - 120),
                                 new string[5] { "Reprendre", "Reglage", "Meteo",  "Saison", "Quitter" }, 200, 40, 60, true);

            menuPauseReglage = new Menu(menuAccueilReglage, new Vector2(Constante.WindowWidth / 2 - 100, Constante.WindowHeight / 2 - 20),
                                 new string[1] { "Retour" }, 200, 40, 60, true);

            menuPauseMeteo = new Menu(menuPausePrincipal, new Vector2(Constante.WindowWidth / 2 - 100, Constante.WindowHeight / 2 - 40 * 2),
                                 new string[4] { "Soleil", "Pluie", "Neige", "retour" }, 200, 40, 40, true);

            menuPauseSaison = new Menu(menuPausePrincipal, new Vector2(Constante.WindowWidth / 2 - 100, Constante.WindowHeight / 2 - 40 * 2),
                                 new string[5] { "Printemps", "Ete", "Automne", "Hiver", "retour" }, 200, 40, 40, true);

            menuPausePrincipal.AddFils(menuPauseReglage);
            menuPausePrincipal.AddFils(menuPauseMeteo);
            menuPausePrincipal.AddFils(menuPauseSaison);
            #endregion
        }
Ejemplo n.º 4
0
 public MoteurGraphique(MoteurJeu moteurJeu)
 {
     this.moteurJeu = moteurJeu;
 }