Exemplo n.º 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 
 static void Main(string[] args)
 {
     using (Jeu jeu = new Jeu())
     {
         jeu.Run();
     }
 }
        public override void Initialize()
        {
            LeJeu = new Jeu(Game);
            int hauteurBouton = RectangleDialogue.Height / (NB_ZONES_DIALOGUE + 1);

            Vector2 PositionBouton = new Vector2(RectangleDialogue.X + RectangleDialogue.Width / 2f,
                                                 RectangleDialogue.Y + (NB_ZONES_DIALOGUE - 2) * hauteurBouton);

            BtnDémarrer = new BoutonDeCommande(Game, "Démarrer", "", "BoutonRouge", "BoutonBleu", PositionBouton, true, true, GérerPause);

            PositionBouton = new Vector2(RectangleDialogue.X + RectangleDialogue.Width / 2f,
                                         RectangleDialogue.Y + (NB_ZONES_DIALOGUE - 1) * hauteurBouton);
            //BtnPause = new BoutonDeCommande(Game, "Pause", "", "BoutonRouge", "BoutonBleu", PositionBouton, true, GérerPause);

            //PositionBouton = new Vector2(RectangleDialogue.X + RectangleDialogue.Width / 2f,
            //                                     RectangleDialogue.Y + NB_ZONES_DIALOGUE * hauteurBouton);
            BtnQuitter = new BoutonDeCommande(Game, "Quitter", "", "BoutonRouge", "BoutonBleu", PositionBouton, true, true, Quitter);

            Game.Components.Add(BtnDémarrer);
            //Game.Components.Add(BtnPause);
            Game.Components.Add(BtnQuitter);
            base.Initialize();
        }