Пример #1
0
        public void CréerBtnGuérisseur()
        {
            int positionXBouton = RectangleDestination.Width / (NB_ZONES_DIALOGUE + 1);

            Vector2 PositionBouton = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 2) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);

            BtnSoinDeZone           = new BoutonDeCommande(Game, "Soin de zone", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort1, INTERVALLE_MAJ_STANDARD);
            BtnSoinDeZone.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton            = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 1) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);
            BtnRéssurection           = new BoutonDeCommande(Game, "Résurrection", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort2, INTERVALLE_MAJ_STANDARD);
            BtnRéssurection.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            BtnVolDeVie           = new BoutonDeCommande(Game, "Vol de vie", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort2, INTERVALLE_MAJ_STANDARD);
            BtnVolDeVie.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            Game.Components.Add(BtnSoinDeZone);
            Game.Components.Add(BtnRéssurection);
            Game.Components.Add(BtnVolDeVie);

            Boutons.Add(BtnSoinDeZone);
            Boutons.Add(BtnRéssurection);
            Boutons.Add(BtnVolDeVie);

            VoirBoutonsGuérisseur(false);
            VoirBoutonsSatan(false);
        }
Пример #2
0
        public override void Initialize()
        {
            int positionXBouton = RectangleDestination.Width / (NB_ZONES_DIALOGUE + 1);

            Vector2 PositionBouton = new Vector2((NB_ZONES_DIALOGUE - 5) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 4f);

            BtnArcher           = new BoutonDeCommande(Game, "Archer", "Arial20", "BoutonRouge", "BoutonBleu", PositionBouton, true, Archer, INTERVALLE_MAJ_STANDARD);
            BtnArcher.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton          = new Vector2((NB_ZONES_DIALOGUE - 4) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 4f);
            BtnGuérisseur           = new BoutonDeCommande(Game, "Guérisseur", "Arial20", "BoutonRouge", "BoutonBleu", PositionBouton, true, Guérisseur, INTERVALLE_MAJ_STANDARD);
            BtnGuérisseur.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton        = new Vector2((NB_ZONES_DIALOGUE - 3) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 4f);
            BtnGuerrier           = new BoutonDeCommande(Game, "Guerrier", "Arial20", "BoutonRouge", "BoutonBleu", PositionBouton, true, Guerrier, INTERVALLE_MAJ_STANDARD);
            BtnGuerrier.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton    = new Vector2((NB_ZONES_DIALOGUE - 2) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 4f);
            BtnMage           = new BoutonDeCommande(Game, "Mage", "Arial20", "BoutonRouge", "BoutonBleu", PositionBouton, true, Mage, INTERVALLE_MAJ_STANDARD);
            BtnMage.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton       = new Vector2((NB_ZONES_DIALOGUE - 1) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 4f);
            BtnPaladin           = new BoutonDeCommande(Game, "Paladin", "Arial20", "BoutonRouge", "BoutonBleu", PositionBouton, true, Paladin, INTERVALLE_MAJ_STANDARD);
            BtnPaladin.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton      = new Vector2((NB_ZONES_DIALOGUE)*positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 4f);
            BtnVoleur           = new BoutonDeCommande(Game, "Voleur", "Arial20", "BoutonRouge", "BoutonBleu", PositionBouton, true, Voleur, INTERVALLE_MAJ_STANDARD);
            BtnVoleur.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton  = new Vector2(Game.Window.ClientBounds.Width - 20, Game.Window.ClientBounds.Height - 20);
            BtnOK           = new BoutonDeCommande(Game, "Ok", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, OK, INTERVALLE_MAJ_STANDARD);
            BtnOK.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            Game.Components.Add(BtnArcher);
            Game.Components.Add(BtnGuérisseur);
            Game.Components.Add(BtnGuerrier);
            Game.Components.Add(BtnMage);
            Game.Components.Add(BtnPaladin);
            Game.Components.Add(BtnVoleur);
            Game.Components.Add(BtnOK);
            VoirBoutonInventaire(false);
        }
Пример #3
0
        public void CréerBtnArcher()
        {
            int positionXBouton = RectangleDestination.Width / (NB_ZONES_DIALOGUE + 1);

            Vector2 PositionBouton = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 2) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);

            BtnPluieDeFlèches           = new BoutonDeCommande(Game, "Pluie de flèches", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort1, INTERVALLE_MAJ_STANDARD);
            BtnPluieDeFlèches.DrawOrder = (int)OrdreDraw.AVANT_PLAN;
            Boutons.Add(BtnPluieDeFlèches);

            PositionBouton              = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 1) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);
            BtnFlèchePercante           = new BoutonDeCommande(Game, "Flèche rebondissante", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort2, INTERVALLE_MAJ_STANDARD);
            BtnFlèchePercante.DrawOrder = (int)OrdreDraw.AVANT_PLAN;
            Boutons.Add(BtnFlèchePercante);

            Game.Components.Add(BtnPluieDeFlèches);
            Game.Components.Add(BtnFlèchePercante);

            VoirBoutonsArcher(false);
        }
Пример #4
0
        public override void Initialize()
        {
            int positionXBouton = RectangleDestination.Width / (NB_ZONES_DIALOGUE + 1);

            Vector2 PositionBouton = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 2) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);

            BtnAttaquer           = new BoutonDeCommande(Game, "Attaquer", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Attaquer, INTERVALLE_MAJ_STANDARD);
            BtnAttaquer.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton     = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 1) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);
            BtnSorts           = new BoutonDeCommande(Game, "Sorts", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sorts, INTERVALLE_MAJ_STANDARD);
            BtnSorts.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton          = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE)*positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);
            BtnPasserTour           = new BoutonDeCommande(Game, "Passer", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, PasserTour, INTERVALLE_MAJ_STANDARD);
            BtnPasserTour.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            DimensionDialogue    = new Vector2(Game.Window.ClientBounds.Width, Game.Window.ClientBounds.Height / 4f);
            RectangleDestination = new Rectangle(Game.Window.ClientBounds.Width - (int)DimensionDialogue.X, Game.Window.ClientBounds.Height - (int)DimensionDialogue.Y,
                                                 (int)DimensionDialogue.X, (int)DimensionDialogue.Y);
            positionXBouton = RectangleDestination.Width / (NB_ZONES_DIALOGUE + 1);

            PositionBouton      = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE)*positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);
            BtnRetour           = new BoutonDeCommande(Game, "retour", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Retour, INTERVALLE_MAJ_STANDARD);
            BtnRetour.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            Game.Components.Add(BtnSorts);
            Game.Components.Add(BtnAttaquer);
            Game.Components.Add(BtnPasserTour);
            Game.Components.Add(BtnRetour);

            Boutons.Add(BtnSorts);
            Boutons.Add(BtnAttaquer);
            Boutons.Add(BtnPasserTour);
            Boutons.Add(BtnRetour);

            VoirBoutonRetour(false);
            VoirBoutonAction(false);

            base.Initialize();
        }
Пример #5
0
        public void CréerBtnVoleur()
        {
            int positionXBouton = RectangleDestination.Width / (NB_ZONES_DIALOGUE + 1);

            Vector2 PositionBouton = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 2) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);

            BtnInvisibilité           = new BoutonDeCommande(Game, "Invisibilité", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort1, INTERVALLE_MAJ_STANDARD);
            BtnInvisibilité.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton             = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 1) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);
            BtnLancerCouteau           = new BoutonDeCommande(Game, "Lancer du couteau", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort2, INTERVALLE_MAJ_STANDARD);
            BtnLancerCouteau.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            Game.Components.Add(BtnInvisibilité);
            Game.Components.Add(BtnLancerCouteau);

            Boutons.Add(BtnInvisibilité);
            Boutons.Add(BtnLancerCouteau);

            VoirBoutonsVoleur(false);
        }
Пример #6
0
        public void CréerBtnPaladin()
        {
            int positionXBouton = RectangleDestination.Width / (NB_ZONES_DIALOGUE + 1);

            Vector2 PositionBouton = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 2) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);

            BtnClarité           = new BoutonDeCommande(Game, "Clarité", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort1, INTERVALLE_MAJ_STANDARD);
            BtnClarité.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton             = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 1) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);
            BtnBouclierDivin           = new BoutonDeCommande(Game, "Bouclier divin", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort2, INTERVALLE_MAJ_STANDARD);
            BtnBouclierDivin.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            Game.Components.Add(BtnClarité);
            Game.Components.Add(BtnBouclierDivin);

            Boutons.Add(BtnClarité);
            Boutons.Add(BtnBouclierDivin);

            VoirBoutonsPaladin(false);
        }
Пример #7
0
        public void CréerBtnMage()
        {
            int positionXBouton = RectangleDestination.Width / (NB_ZONES_DIALOGUE + 1);

            Vector2 PositionBouton = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 2) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);

            BtnBrazzer           = new BoutonDeCommande(Game, "Brasier", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort1, INTERVALLE_MAJ_STANDARD);
            BtnBrazzer.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton              = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 1) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);
            BtnFreezeDontMove           = new BoutonDeCommande(Game, "Freeze", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort2, INTERVALLE_MAJ_STANDARD);
            BtnFreezeDontMove.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            Game.Components.Add(BtnBrazzer);
            Game.Components.Add(BtnFreezeDontMove);

            Boutons.Add(BtnBrazzer);
            Boutons.Add(BtnFreezeDontMove);

            VoirBoutonsMage(false);
        }
Пример #8
0
        public void CréerBtnGuerrier()
        {
            int positionXBouton = RectangleDestination.Width / (NB_ZONES_DIALOGUE + 1);

            Vector2 PositionBouton = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 2) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);

            BtnTornadeFurieuse           = new BoutonDeCommande(Game, "Tornade furieuse", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort1, INTERVALLE_MAJ_STANDARD);
            BtnTornadeFurieuse.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            PositionBouton     = new Vector2(RectangleDestination.X + (NB_ZONES_DIALOGUE - 1) * positionXBouton, RectangleDestination.Y + RectangleDestination.Height / 2f);
            BtnFolie           = new BoutonDeCommande(Game, "Folie", "Arial20", "BoutonRouge", "BoutonRouge", PositionBouton, true, Sort2, INTERVALLE_MAJ_STANDARD);
            BtnFolie.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            Game.Components.Add(BtnTornadeFurieuse);
            Game.Components.Add(BtnFolie);

            Boutons.Add(BtnTornadeFurieuse);
            Boutons.Add(BtnFolie);

            VoirBoutonsGuerrier(false);
        }
Пример #9
0
        public override void Initialize()
        {
            int hauteurBouton = RectangleDestination.Height / (NB_ZONES_DIALOGUE + 1);

            Police = Game.Content.Load <SpriteFont>("Fonts/" + "Arial20");

            Vector2 positionBouton = new Vector2(RectangleDestination.X + RectangleDestination.Width / 2f, (NB_ZONES_DIALOGUE - 2) * hauteurBouton);

            BtnJouer           = new BoutonDeCommande(Game, "Jouer", "Arial20", "BoutonRouge", "BoutonRouge", positionBouton, true, Jouer, INTERVALLE_MAJ_STANDARD);
            BtnJouer.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            positionBouton          = new Vector2(RectangleDestination.X + RectangleDestination.Width / 2f, (NB_ZONES_DIALOGUE - 1) * hauteurBouton);
            BtnInventaire           = new BoutonDeCommande(Game, "Inventaire", "Arial20", "BoutonRouge", "BoutonRouge", positionBouton, true, Inventaire, INTERVALLE_MAJ_STANDARD);
            BtnInventaire.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            Vector2 dimensionBouton = Police.MeasureString("Quitter");

            positionBouton       = new Vector2(dimensionBouton.X / 2, Game.Window.ClientBounds.Height - dimensionBouton.Y / 2);
            BtnQuitter           = new BoutonDeCommande(Game, "Quitter", "Arial20", "BoutonRouge", "BoutonRouge", positionBouton, true, Quitter, INTERVALLE_MAJ_STANDARD);
            BtnQuitter.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            dimensionBouton  = Police.MeasureString("Jeu de bataille");
            NomJeu           = new TexteCentré(Game, "Jeu de bataille", "Arial20", new Rectangle(100, 100, (int)dimensionBouton.X, (int)dimensionBouton.Y), Color.White, 0);
            NomJeu.DrawOrder = (int)OrdreDraw.AVANT_PLAN;

            dimensionBouton     = Police.MeasureString("Retour au menu");
            positionBouton      = new Vector2(Game.Window.ClientBounds.Width - dimensionBouton.X / 2, Game.Window.ClientBounds.Height - dimensionBouton.Y / 2);
            BtnRetour           = new BoutonDeCommande(Game, "Retour au menu", "Arial20", "BoutonRouge", "BoutonRouge", positionBouton, true, Retour, INTERVALLE_MAJ_STANDARD);
            BtnRetour.DrawOrder = (int)OrdreDraw.AVANT_PLAN;
            BtnRetour.Enabled   = false;
            BtnRetour.Visible   = false;

            Game.Components.Add(BtnJouer);
            Game.Components.Add(BtnInventaire);
            Game.Components.Add(BtnQuitter);
            Game.Components.Add(NomJeu);
            Game.Components.Add(BtnRetour);
        }