コード例 #1
0
 public EnvironnementDeBase(Game game, GestionEnvironnement gestionEnv, string personnageJoueurPrincipalModel, string personnageJoueurPrincipalTexture,
                         string personnageJoueurSecondaireModel, string personnageJoueurSecondaireTexture, TypePartie typePartie)
     : base(game)
 {
     PersonnageJoueurPrincipalModel = personnageJoueurPrincipalModel;
      PersonnageJoueurPrincipalTexture = personnageJoueurPrincipalTexture;
      PersonnageJoueurSecondaireModel = personnageJoueurSecondaireModel;
      PersonnageJoueurSecondaireTexture = personnageJoueurSecondaireTexture;
      TypeDePartie = typePartie;
 }
コード例 #2
0
 public override void Initialize()
 {
     ChangerNiveau = 0;
     EnvironnementPartie = new GestionEnvironnement(Game, Environnements.Garage, SuperboyPersonnage.superBoy.ToString(), SuperboyPersonnage.superBoyTex.ToString(), SuperboyPersonnage.superBoy.ToString(), SuperboyPersonnage.superBoyTex.ToString(), TypePartie.Histoire);
     ModifierActivation();
     if (EstPartieActive)
     {
         Game.Components.Add(EnvironnementPartie);
     }
     Game.Components.Remove(this);
     Game.Components.Add(new GestionPartie(Game));
     MediaPlayer.Stop();
     Game.Components.Add(new ATH(Game, JoueurPrincipal));
     base.Initialize();
 }
コード例 #3
0
 public EnvironnementGarage(Game game, GestionEnvironnement gestionEnv, string personnageJoueurPrincipalModel, string personnageJoueurPrincipalTexture,
                         string personnageJoueurSecondaireModel, string personnageJoueurSecondaireTexture, TypePartie typeDePartie)
     : base(game, gestionEnv, personnageJoueurPrincipalModel, personnageJoueurPrincipalTexture,
         personnageJoueurSecondaireModel, personnageJoueurSecondaireTexture, typeDePartie)
 {
 }
コード例 #4
0
 void TroisièmeNiveau()
 {
     for(int i = 3; i<Game.Components.Count;i++)
     {
         Game.Components.RemoveAt(i);
         i--;
     }
     Game.Services.RemoveService(typeof(Caméra));
     EnvironnementPartie = new GestionEnvironnement(Game, Environnements.SalleManger, SuperboyPersonnage.superBoy.ToString(), SuperboyPersonnage.superBoyTex.ToString(), SuperboyPersonnage.superBoy.ToString(), SuperboyPersonnage.superBoyTex.ToString(), TypePartie.Histoire);
     Game.Components.Add(EnvironnementPartie);
     Game.Components.Add(new ATH(Game, JoueurPrincipal));
 }
コード例 #5
0
        public InfoMode1v1LAN(JoueurMultijoueur joueurPrincipal,JoueurMultijoueur joueurSecondaire, GestionPartie gestionnairePartie, 
            bool estPartieActive, GestionEnvironnement environnementPartie, 
            NetworkServer serveur)
        {
            if (joueurPrincipal != null)
            {
                InfoJoueurPrincipal = new InfoJoueurMultijoueur(joueurPrincipal.Avatar, joueurPrincipal.GamerTag,
                    joueurPrincipal.ImageJoueur, joueurPrincipal.GestionnaireDeLaPartie,
                    joueurPrincipal.EstActif, joueurPrincipal.IP);
            }
            else
                Console.WriteLine("Joueur Principal null");

            if (joueurSecondaire != null)
            {
                InfoJoueurSecondaire = new InfoJoueurMultijoueur(joueurSecondaire.Avatar, joueurSecondaire.GamerTag,
                    joueurSecondaire.ImageJoueur, joueurSecondaire.GestionnaireDeLaPartie,
                    joueurSecondaire.EstActif, joueurSecondaire.IP);
            }
            else
                Console.WriteLine("Joueur Secondaire null");

            InfoGestionnairePartie = new InfoGestionPartie();

            EstPartieActive = estPartieActive;

            InfoGestionnaireEnvironnement = new InfoGestionEnvironnement(environnementPartie.NomEnvironnement);

            InfoServer = new InfoNetworkServer(serveur.Port, serveur.NomJeu, serveur.Temps);
        }
コード例 #6
0
        void ActiverEnvironnement()
        {
            if (EstPartieActive)
            {
                EnvironnementPartie = new GestionEnvironnement(this.Game, Environnement, SuperboyPersonnage.superBoy.ToString(), SuperboyPersonnage.superBoyTex2.ToString(), SuperboyPersonnage.superBoy.ToString(), SuperboyPersonnage.superBoyTex.ToString(),TypePartie.LAN);
                EnleverMenuSelectionEnvironnement();
                Game.Components.Add(EnvironnementPartie);
                MediaPlayer.Stop();

                ListePerso = new List<Personnage>();
                foreach (Personnage perso in Game.Components.Where(item => item is Personnage))
                {
                   ListePerso.Add(perso);
                }
            }
        }
コード例 #7
0
 void InitialiserSousSol()
 {
     EnvironnementPartie = new GestionEnvironnement(Game, Environnements.SousSol, SuperboyPersonnage.superBoy.ToString(), SuperboyPersonnage.superBoyTex2.ToString(), SuperboyPersonnage.superBoy.ToString(), SuperboyPersonnage.superBoyTex.ToString(),TypePartie.Pratique);
     ModifierActivation();
     if (EstPartieActive)
     {
         Game.Components.Add(EnvironnementPartie);
         Game.Components.Add(ath);
     }
     Game.Components.Remove(BoutonGarage);
     Game.Components.Remove(BoutonSalleManger);
     Game.Components.Remove(BoutonSousSol);
     Game.Components.Remove(this);
     Game.Components.Add(new GestionPartie(Game));
     MediaPlayer.Stop();
 }