Ejemplo n.º 1
0
        public override void Initialize()
        {
            NuméroChoisi     = 0;
            NoDuPokemonEnJeu = 0;
            InitialiserMainChoix();
            LeJoueur = Game.Services.GetService(typeof(Player)) as Player;
            InitialiserListeChoixFight();
            FightChoix = new AfficheurChoix(Game, Position, (int)Dimensions.X, ListeChoix.Count + 2, ListeChoix, IntervalMAJ);

            InitialiserBagChoix();

            InitialiserListeChoixPokemon();
            PokemonChoix = new AfficheurChoix(Game, new Vector2(Position.X + Cadre.TAILLE_TILE * 9, Position.Y - Cadre.TAILLE_TILE * 2), MAX_NB_LETTRES_PAR_LIGNE + 4, ListeChoix.Count + 2, ListeChoix, IntervalMAJ);

            Wait         = AfficheurTexte.MessageEnCours;
            GestionInput = Game.Services.GetService(typeof(InputManager)) as InputManager;

            ComposantesBattleMenu = new List <DrawableGameComponent>();
            ComposantesBattleMenu.Add(MainChoix);
            ComposantesBattleMenu.Add(FightChoix);
            ComposantesBattleMenu.Add(BagChoix);
            ComposantesBattleMenu.Add(PokemonChoix);
            DisableComponents();
            foreach (DrawableGameComponent item in ComposantesBattleMenu)
            {
                Game.Components.Add(item);
            }
            //MainChoix.Enabled = true;
            //MainChoix.Visible = true;
            BattleMenuState = BattleMenuState.MAIN;
            base.Initialize();
        }
Ejemplo n.º 2
0
 private void InitialiserMainChoix()
 {
     ListeChoix = new List <string>();
     ListeChoix.Add("FIGHT");
     ListeChoix.Add("BAG");
     ListeChoix.Add("POKEMON");
     ListeChoix.Add("RUN");
     MainChoix = new AfficheurChoix(Game, Position, (int)Dimensions.X, ListeChoix.Count + 2, ListeChoix, IntervalMAJ);
 }
Ejemplo n.º 3
0
 private void InitialiserBagChoix()//Un trainer peut pas avoir plus que 6 sortes d'items sur lui? (+ simple pour afficher)
 {
     ListeChoix = new List <string>();
     ListeChoix.Add("Pokeball");
     //ListeChoix.Add("Greatball");//UserTrainerBag[0].toString()     //Mettre en boucle? (on devra override item.tostring? (faire une classe item?))
     //ListeChoix.Add("Masterball");//UserTrainerBag[1].toString()
     //ListeChoix.Add("Item 3");//UserTrainerBag[2].toString()
     //ListeChoix.Add("Item 4");//UserTrainerBag[3].toString()
     //ListeChoix.Add("Item 5");//UserTrainerBag[4].toString()
     //ListeChoix.Add("Item 6");//UserTrainerBag[5].toString()
     BagChoix = new AfficheurChoix(Game, new Vector2(Position.X + Cadre.TAILLE_TILE * 9, Position.Y - Cadre.TAILLE_TILE * 2), (int)Dimensions.X - 9, ListeChoix.Count + 2, ListeChoix, IntervalMAJ);
 }