Ejemplo n.º 1
0
 public void Teleportation(Joueur joueur, Carte carte, GameWindow window, GestionTeleportation gestion_teleportation, EcranChargement ecran_chargement)
 {
     if (!gestion_teleportation.Transition_active && Coordonnees.Intersects(new Rectangle((int)joueur.centre_joueur.X - 20, (int)joueur.centre_joueur.Y - 20, 40, 70)))
     {
         gestion_teleportation.Transition_active = true;
         ecran_chargement.transition = true;
         carte.Chargement(Destination);
         joueur.Positionnement(xdestination, ydestination);
     }
 }
Ejemplo n.º 2
0
 public Carte()
 {
     largeur = 0;
     hauteur = 0;
     //
     carte = new List<List<char>>();
     ligne = new List<char>();
     //
     collision = new List<List<Rectangle>>();
     collisionligne = new List<Rectangle>();
     //
     gestionTeleportation = new GestionTeleportation();
 }
Ejemplo n.º 3
0
 public Carte()
 {
     largeur = 0;
     hauteur = 0;
     //
     carte = new List<List<char>>();
     ligne = new List<char>();
     //
     collision = new List<List<Rectangle>>();
     collisionligne = new List<Rectangle>();
     //
     gestionTeleportation = new GestionTeleportation();
     //
     gestion_objet = new Gestion_Objet();
     //
     murs = new Mur();
     //
     gestion_ennemis = new Gestion_Ennemi();
 }
Ejemplo n.º 4
0
        public void Affichage(Carte carte, Joueur joueur, SpriteBatch spriteBatch, Environnement environnement, EcranChargement ecranChargement, GestionTeleportation gestion_transition, Histoire histoire, KeyboardState clavier)
        {
            if (ecranChargement.affichage_ecran)
            {
                for (int i = 0; i < carte.carte.Count; i++)
                {
                    for (int j = 0; j < carte.carte[i].Count; j++)
                    {
                        carte.AffichageCase(40 * j - x, 40 * i - y, spriteBatch, carte.carte[i][j], environnement, joueur, new Vector2(j * 40, i * 40));
                    }
                }
            }

            carte.gestion_objet.Draw(spriteBatch, x, y, environnement);
            carte.murs.AffichageCase_Mur(x, y, spriteBatch, joueur, new Color(environnement.ambient, environnement.ambient, environnement.ambient));
            carte.gestion_ennemis.Draw(spriteBatch, x, y, environnement);

            if (affichage_collision)
            {
                foreach (List<Rectangle> rect_ligne in carte.collision)
                {
                    foreach (Rectangle rect in rect_ligne)
                    {
                        spriteBatch.Draw(texture_collision, new Rectangle(rect.X - x, rect.Y - y, rect.Width, rect.Height), Color.White);
                    }
                }

                carte.gestionTeleportation.Draw(spriteBatch, x, y);

            }

            joueur.Draw(spriteBatch, environnement, 0, 0);

            carte.murs.AffichageMur_DevantJoueur(x, y, spriteBatch, joueur, new Color(environnement.ambient, environnement.ambient, environnement.ambient));

            histoire.Draw(spriteBatch, x, y, clavier);
        }
Ejemplo n.º 5
0
        protected override void Initialize()
        {
            graphics.ToggleFullScreen();

            #region Gestionnaire
                gameManager = new GameManager();
                carte = new Carte();
                gestionnaire_son = new Gestionnaire_son();
                environnement = new Environnement(Window);
            #endregion

            #region Interface
                lancement = new Lancement();
                menu = new Menu(Window);
                camera = new Camera(Window);
                curseur = new Curseur(Content.Load<Texture2D>("Curseur"));
                jauge = new Jauge();
                barreAction = new BarreAction(Window);
            #endregion

            bruitages = new Bruitages();
            joueur = new Joueur(Window, Joueur.Sexe.homme);
            gestion_transition = new GestionTeleportation();
            ecran_chargement = new EcranChargement(Window);
            joueur.inventaire = new Inventaire(Window);
            histoire = new Histoire(Window);
            intro = new IntroNouveauJeu(Window);
            base.Initialize();
            //Guide.ShowSignIn(1, false);
        }
Ejemplo n.º 6
0
        protected override void Initialize()
        {
            graphics.ToggleFullScreen();

            #region Gestionnaire
            gameManager = new GameManager();
            jeu = new GestionJeu();
            mapManager = new MapManager();
            soundManager = new SoundManager();
            collisionManager = new CollisionManager();
            gestionTeleportation = new GestionTeleportation();
            #endregion

            #region Interface
            lancement = new Lancement();
            menu = new Menu(Window);
            curseur = new Curseur(Content.Load<Texture2D>("Curseur"));
            jauge = new Jauge();
            #endregion

            joueur = new PersonnageJouable(Window, PersonnageJouable.Sexe.femme);

            base.Initialize();
        }
Ejemplo n.º 7
0
        protected override void Initialize()
        {
            graphics.ToggleFullScreen();

            #region Gestionnaire
                gameManager = new GameManager();
                carte = new Carte();
                gestionnaire_son = new Gestionnaire_son();
                environnement = new Environnement(Window);
            #endregion

            #region Interface
                lancement = new Lancement();
                menu = new Menu(Window);
                camera = new Camera(Window);
                curseur = new Curseur(Content.Load<Texture2D>("Curseur"));
                jauge = new Jauge();
                barreAction = new BarreAction(Window);
            #endregion

            joueur = new Joueur(Window, Joueur.Sexe.homme);
            gestion_transition = new GestionTeleportation();
            ecran_chargement = new EcranChargement(Window);

            base.Initialize();
        }