protected override void Initialize() { const int DIMENSION_TERRAIN = 256; Vector2 étenduePlan = new Vector2(DIMENSION_TERRAIN, DIMENSION_TERRAIN); Vector2 charpentePlan = new Vector2(4, 3); Vector3 positionCaméra = new Vector3(0, 20, 125); Vector3 cibleCaméra = new Vector3(0, 0, 0); Vector3 positionARC170 = new Vector3(25, 15, 0); Vector3 positionBiplan = new Vector3(20, 10, 0); Vector3 positionFeisar = new Vector3(20, 15, 20); Vector3 positionCylindre1 = new Vector3(-90, 10, -90); Vector3 positionCylindre2 = new Vector3(-20, 10, -20); Vector3 positionCylindre3 = new Vector3(-90, 10, 90); ListeMurs = new List<GameComponent>(); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireDeModèles = new RessourcesManager<Model>(this, "Models"); GestionnaireDeShaders = new RessourcesManager<Effect>(this, "Effects"); GestionnaireDeSoundEffect = new RessourcesManager<SoundEffect>(this, "Sounds"); GestionnaireDeSong = new RessourcesManager<Song>(this, "Songs"); GestionInput = new InputManager(this); GestionSounds = new SoundManager(this); CaméraJeu = new Caméra(this, new Vector3(-105f, 0f, 4f), new Vector3(0f,(float)Math.PI/2f,0f), 50f, "jump", "landing","walk", "backgroundMusic", "walk_slow"); Components.Add(GestionSounds); Components.Add(GestionInput); Components.Add(CaméraJeu); Components.Add(new Afficheur3D(this)); Components.Add(new Carte(this, new Vector3(DIMENSION_TERRAIN, 25, DIMENSION_TERRAIN), "Terrain")); //Components.Add(new PlanTexturé(this, 1f, new Vector3(0, MathHelper.PiOver2, 0), new Vector3(-DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2, 0), étenduePlan, charpentePlan, "CielGauche", INTERVALLE_MAJ_STANDARD)); //Components.Add(new PlanTexturé(this, 1f, new Vector3(0, -MathHelper.PiOver2, 0), new Vector3(DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2, 0), étenduePlan, charpentePlan, "CielDroite", INTERVALLE_MAJ_STANDARD)); //Components.Add(new PlanTexturé(this, 1f, Vector3.Zero, new Vector3(0, DIMENSION_TERRAIN / 2, -DIMENSION_TERRAIN / 2), étenduePlan, charpentePlan, "CielAvant", INTERVALLE_MAJ_STANDARD)); //Components.Add(new PlanTexturé(this, 1f, new Vector3(0, -MathHelper.Pi, 0), new Vector3(0, DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2), étenduePlan, charpentePlan, "CielArrière", INTERVALLE_MAJ_STANDARD)); //Components.Add(new PlanTexturé(this, 1f, new Vector3(MathHelper.PiOver2, 0, 0), new Vector3(0, DIMENSION_TERRAIN - 1, 0), étenduePlan, charpentePlan, "CielDessus", INTERVALLE_MAJ_STANDARD)); Components.Add(new Cylindre(this, 1f, new Vector3(0, MathHelper.PiOver2, 0), positionCylindre1, new Vector2(5f, 10f), new Vector2(30, 30), "old_brick_01", INTERVALLE_MAJ_STANDARD)); Services.AddService(typeof(Random), new Random()); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); Services.AddService(typeof(RessourcesManager<Model>), GestionnaireDeModèles); Services.AddService(typeof(RessourcesManager<Effect>), GestionnaireDeShaders); Services.AddService(typeof(RessourcesManager<SoundEffect>), GestionnaireDeSoundEffect); Services.AddService(typeof(RessourcesManager<Song>), GestionnaireDeSong); Services.AddService(typeof(InputManager), GestionInput); Services.AddService(typeof(SoundManager), GestionSounds); Services.AddService(typeof(Caméra), CaméraJeu); GestionSprites = new SpriteBatch(GraphicsDevice); Services.AddService(typeof(SpriteBatch), GestionSprites); base.Initialize(); GestionSounds.Play("backgroundMusic"); //GestionSounds.Play("First_Sentence", false, 0.5f); }
public CaméraSubjective(Game jeu, InputManager inputMgr, Vector3 positionCaméra, Vector3 cible, Vector3 orientation, float intervalleMAJ) : base(jeu) { InputMgr = inputMgr; CréerVolumeDeVisualisation(OUVERTURE_OBJECTIF, DISTANCE_PLAN_RAPPROCHÉ, DISTANCE_PLAN_ÉLOIGNÉ); CréerPointDeVue(positionCaméra, cible, orientation); EstEnZoom = false; }
public GestionnaireDeScènes(RPG jeu, SpriteBatch spritesMgr, RessourcesManager<SpriteFont> fontsMgr, RessourcesManager<Texture2D> texturesMgr, RessourcesManager<Model> modelsMgr, InputManager inputMgr) : base(jeu) { Jeu = jeu; SpritesManager = spritesMgr; FontsManager = fontsMgr; TexturesManager = texturesMgr; ModelsManager = modelsMgr; InputManager = inputMgr; ListeDesScènes = new List<Scène>(); }
protected override void Initialize() { Vector2 DimensionÉcran = new Vector2(GameConstants.WindowWidth, GameConstants.WindowHeight); AfficheurFPS_ a = new AfficheurFPS_(this, 1 / 60f); F1 = new Fusil(this, "balle", Vector2.Zero, new Vector2(15, 15), new Vector2(0, -15)); cam = new Camera2d(); cam.Pos = Vector2.Zero; GestionnaireTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireInput = new InputManager(this); spriteBatch = new SpriteBatch(GraphicsDevice); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireTextures); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireFonts); Services.AddService(typeof(InputManager), GestionnaireInput); Services.AddService(typeof(SpriteBatch), spriteBatch); Services.AddService(typeof(Camera2d), cam); ListeComposantes = new List<IColisionable>(); ioManagerJ1 = new IOManager(this, 1); J1 = new Avatar(this, "hitman1_stand", DimensionÉcran / 2, new Vector2(30, 30), 1f / 1000, 1, ioManagerJ1); InfoJ1 = new InformationJoueur(this, "tile_12", new Vector2(100, 50), new Vector2(200, 100), J1); Components.Add(GestionnaireInput); Components.Add(a); //Components.Add(J1); Components.Add(ioManagerJ1); //-------------------------------- Test physique------------------// ListePhysique = new List<EntitéPhysique>(); T1 = new Tile(this, "CielÉtoilé", new Vector3(DimensionÉcran.X / 2, DimensionÉcran.Y / 2, 0), new Vector3(DimensionÉcran.X / 2, DimensionÉcran.Y / 2, 0), 1 / 60f, 0.2f); T2 = new Tile(this, "tile_12", new Vector3(0, DimensionÉcran.Y / 2, 1f), new Vector3(DimensionÉcran.X / 2, DimensionÉcran.Y / 2, 0), 1 / 60f,0.9f); J1Test = new Avatar_(this, "balle", new Vector3(DimensionÉcran.X / 2, DimensionÉcran.Y / 2, 5f), new Vector3(30, 30, 1), 1 / 60f, 1, ioManagerJ1); Components.Add(J1Test); Components.Add(T1); Components.Add(T2); ListePhysique.Add(J1Test); ListePhysique.Add(T1); ListePhysique.Add(T2); //----------------------------------------------------------------// base.Initialize(); F1.Initialize(); //les classes que je ne veux pas mettre en components pour que ne soient pas automatiquement updater/dessiner InfoJ1.Initialize(); }
protected override void Initialize() { GestionInput = new InputManager(this); GestionSprites = new SpriteBatch(GraphicsDevice); Calculateur = new CalculateurFPS(this, INTERVALLE_CALCUL_FPS); ListeGameComponents = new List<GameComponent>(); NbEnnemis = 3; AddServices(); InitializeComponents(); Components.Add(GestionInput); Components.Add(Calculateur); AddComponents(); Marge = (int)(Window.ClientBounds.Width * POURCENTAGE_MARGE); PositionZoneContenu = Marge / 2; base.Initialize(); }
protected override void Initialize() { //const int DIMENSION_TERRAIN = 256; //Vector2 étenduePlan = new Vector2(DIMENSION_TERRAIN, DIMENSION_TERRAIN); //Vector2 charpentePlan = new Vector2(4, 3); //Vector3 positionCaméra = new Vector3(0, 250, 125); //Vector3 cibleCaméra = new Vector3(0, 0, 0); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); //GestionnaireDeModèles = new RessourcesManager<Model>(this, "Models"); GestionnaireDeShaders = new RessourcesManager<Effect>(this, "Effects"); GestionInput = new InputManager(this); //CaméraJeu = new CaméraSubjective(this, positionCaméra, cibleCaméra, Vector3.Up, INTERVALLE_MAJ_STANDARD); Components.Add(new Menu(this)); Components.Add(GestionInput); //Components.Add(CaméraJeu); //Components.Add(new Afficheur3D(this)); //Components.Add(new PlanTexturé(this, 1f, new Vector3(0, MathHelper.PiOver2, 0), new Vector3(-DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2, 0), étenduePlan, charpentePlan, "BeerPong", INTERVALLE_MAJ_STANDARD)); //Components.Add(new PlanTexturé(this, 1f, new Vector3(0, -MathHelper.PiOver2, 0), new Vector3(DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2, 0), étenduePlan, charpentePlan, "BeerPong", INTERVALLE_MAJ_STANDARD)); //Components.Add(new PlanTexturé(this, 1f, Vector3.Zero, new Vector3(0, DIMENSION_TERRAIN / 2, -DIMENSION_TERRAIN / 2), étenduePlan, charpentePlan, "BeerPong", INTERVALLE_MAJ_STANDARD)); //Components.Add(new PlanTexturé(this, 1f, new Vector3(0, -MathHelper.Pi, 0), new Vector3(0, DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2), étenduePlan, charpentePlan, "BeerPong", INTERVALLE_MAJ_STANDARD)); //Components.Add(new PlanTexturé(this, 1f, new Vector3(MathHelper.PiOver2, 0, 0), new Vector3(0, DIMENSION_TERRAIN - 1, 0), étenduePlan, charpentePlan, "BeerPong", INTERVALLE_MAJ_STANDARD)); //Components.Add(new AfficheurFPS(this, "Arial20", Color.Gold, INTERVALLE_CALCUL_FPS)); Services.AddService(typeof(Random), new Random()); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); //Services.AddService(typeof(RessourcesManager<Model>), GestionnaireDeModèles); Services.AddService(typeof(RessourcesManager<Effect>), GestionnaireDeShaders); Services.AddService(typeof(InputManager), GestionInput); //Services.AddService(typeof(Caméra), CaméraJeu); GestionSprites = new SpriteBatch(GraphicsDevice); Services.AddService(typeof(SpriteBatch), GestionSprites); base.Initialize(); }
protected override void Initialize() { Vector3 positionCaméra = new Vector3(0, 10, 0); Vector3 cibleCaméra = new Vector3(0, 9, -10); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireDeModèles = new RessourcesManager<Model>(this, "Models"); GénérateurAléatoire = new Random(); GestionInput = new InputManager(this); GestionSprites = new SpriteBatch(GraphicsDevice); //Map = new Terrain(this, Vector3.Zero, new Vector2(300, 300), GestionnaireDeTextures.Find("Sand"), GestionnaireDeTextures.Find("heightmap")); //BaldorLeBrave = new Héros(this, "unicorn", 10f, new Vector3(1, 0, -5), new Vector3(0, 0, 0), 0.01f, "Charlie The Hurrnicorn", 30f, MathHelper.Pi * 4, false, 42, 15, 5, 8, 6, 0.8f); //faggit = new Monstre(this, BaldorLeBrave, "unicorn", 8f, new Vector3(2, 0, -9), new Vector3(0, 0, 0), 0.01f, "faggit", 25f, MathHelper.Pi * 4, false, 21, 3, 6, 4, 1f, 15, 50); //InterfaceUtilisateur = new UI(this, BaldorLeBrave, GestionnaireDeTextures.Find("UI"), GestionnaireDeTextures.Find("Vie"), GestionnaireDeTextures.Find("Mana")); //CaméraJeu = new CaméraThirdPerson(this, GestionInput, positionCaméra, BaldorLeBrave, Vector3.Up, 0.01f); // Services Services.AddService(typeof(InputManager), GestionInput); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); Services.AddService(typeof(RessourcesManager<Model>), GestionnaireDeModèles); Services.AddService(typeof(SpriteBatch), GestionSprites); Services.AddService(typeof(Random), GénérateurAléatoire); Components.Add(GestionInput); GestionScènes = new GestionnaireDeScènes(this, GestionSprites, GestionnaireDeFonts, GestionnaireDeTextures, GestionnaireDeModèles, GestionInput); Components.Add(GestionScènes); base.Initialize(); }
protected override void Initialize() { //camérajeu = new CaméraSubjective(this, new Vector3(0, 100, 150), new Vector3(0, 80, 0), Vector3.Up, INTERVALLE_MAJ_STANDARD); //Components.Add(camérajeu); //Services.AddService(typeof(Caméra), camérajeu); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireDeModèles = new RessourcesManager<Model>(this, "Models"); GestionnaireDeShaders = new RessourcesManager<Effect>(this, "Effects"); GestionInput = new InputManager(this); Components.Add(new Menu(this)); Components.Add(GestionInput); Components.Add(new Afficheur3D(this)); Components.Add(new AfficheurFPS(this, INTERVALLE_CALCUL_FPS)); Services.AddService(typeof(Random), new Random()); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); Services.AddService(typeof(RessourcesManager<Model>), GestionnaireDeModèles); Services.AddService(typeof(RessourcesManager<Effect>), GestionnaireDeShaders); Services.AddService(typeof(InputManager), GestionInput); GestionSprites = new SpriteBatch(GraphicsDevice); Services.AddService(typeof(SpriteBatch), GestionSprites); base.Initialize(); }
protected override void Initialize() { const int DIMENSION_TERRAIN = 512; Vector2 étenduePlan = new Vector2(DIMENSION_TERRAIN, DIMENSION_TERRAIN); Vector2 charpentePlan = new Vector2(4, 3); Vector3 positionCaméra = new Vector3(5, 5, 5); Vector3 cibleCaméra = new Vector3(0, 0, 0); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireDeModèles = new RessourcesManager<Model>(this, "Models"); GestionnaireDeShaders = new RessourcesManager<Effect>(this, "Effects"); GestionnaireSound = new RessourcesManager<SoundEffect>(this,"Sounds"); GestionInput = new InputManager(this); CaméraJeu = new CaméraFirstPerson(this, positionCaméra, cibleCaméra, Vector3.Up, INTERVALLE_MAJ_STANDARD, "LionelEssai4"); liste = new List<SoundEffect>(); for (int z = 1; z <= 2; ++z) { liste.Add(GestionnaireSound.Find("beat" + z.ToString())); } Services.AddService(typeof(RessourcesManager<SoundEffect>), new RessourcesManager<SoundEffect>(this, "Sounds")); Components.Add(GestionInput); Components.Add(CaméraJeu); Components.Add(new Afficheur3D(this)); #endregion #region LIGNE PARKING //LignePArking Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-6,1,15), new Vector2(1,98), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-30, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-26, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-22, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-18, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-18, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-30, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-26, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-22, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-52, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-48, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-44, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-40, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-40, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-52, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-48, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-44, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(20, 1, 25), new Vector2(1, 56), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(35, 1, 25), new Vector2(1, 56), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 25), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 29), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 33), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 37), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 41), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 45), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 49), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 53), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 25), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 29), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 33), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 37), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 41), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 45), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 49), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 53), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-52, 1, 30), new Vector2(69, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-52, 1, 48), new Vector2(69, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); #endregion #region PAVILLON ORDINIQUE //PAVILLON ORDINIQUE //StreamReader fichierLecture = new StreamReader(@"../../" + nomFichier, System.Text.Encoding.UTF7); //char[] séparateur = new char[] { ';' }; //char[] SéparateurNom = new char[] { ',' }; //List<String> lignes = new List<string>(); //string lignelu; //while(!fichierLecture.EndOfStream) //{ // lignelu = fichierLecture.ReadLine(); // string[] champs = lignelu.Split(séparateur[0]); // lignes.Add(champs[0]); // lignes.Add(champs[1]); //} //for (int i = 0; i < NOMBRE_DE_LIGNE; ++i) //{ //} Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(100, 0, 21*2), new Vector2(20, 10), "MurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(100, 0, 55*2), new Vector2(20, 10), "MurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(100, 0, 21*2), new Vector2(68, 10), "MurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(120, 0, 21*2), new Vector2(68, 10), "MurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturée(this, 1f, Vector3.Zero, new Vector3(100, 5, 21*2), new Vector2(20, 68), "ToitPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(49.99f*2, 0.7f*2, 25), new Vector2(3,4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f*2),3*2, 24.8f*2), new Vector2(4,2 ), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f * 2), 3 , 30.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f * 2), 3 , 36.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f * 2), 3 , 42.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f * 2), 3 , 48.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f * 2), 1.5f * 2, 30.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f * 2), 1.5f , 36.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f * 2), 1.5f, 42.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f * 2), 0.7f , 49.1f * 2), new Vector2(3, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 0.7f, 25 * 2), new Vector2(3, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 3, 24.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 3, 30.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 3, 36.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 3, 42.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 3, 48.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 1.5f, 30.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 1.5f, 36.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 1.5f, 42.8f * 2), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f * 2), 0.7f, 49.1f * 2), new Vector2(3, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); //PAVILLON ORDINIQUE INTÉRIEUR -MUR-PLAFOND-PLANCHER Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50 * 2, 0, 54.9f * 2), new Vector2(20, 10), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0 * 2, 21.1f * 2), new Vector2(20, 10), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(59.9f * 2, 0, 21 * 2), new Vector2(68, 10), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(50.1f * 2, 0, 21 * 2), new Vector2(68, 10), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturée(this, 1f, Vector3.Zero, new Vector3(50 * 2, 0.7f, 21.1f * 2), new Vector2(20, 68), "PlancherIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturée(this, 1f, Vector3.Zero, new Vector3(50 * 2, 2.85f, 21.1f * 2), new Vector2(20, 68), "PlancherIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéePlafond(this, 1f, Vector3.Zero, new Vector3(50 * 2, 2.71f, 21.1f * 2), new Vector2(20, 68), "PlafondPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéePlafond(this, 1f, Vector3.Zero, new Vector3(50 * 2, 4.9f, 21.1f * 2), new Vector2(20, 68), "PlafondPavillon", INTERVALLE_MAJ_STANDARD)); #endregion #region Mur cLASSE Pavillon Ordinique #region CLASSE PAVILLON ORDINIQUE //Mur cLASSE Pavillon Ordinique Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 0, 42f), new Vector2(7, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 41.8f), new Vector2(7, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 0, 33.7f), new Vector2(7, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 33.5f), new Vector2(7, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 0, 48), new Vector2(7, 5.1f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 47.99f), new Vector2(7, 5.1f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 2.71f, 48), new Vector2(9, 4.75f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 2.71f, 47.99f), new Vector2(9, 4.75f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 0, 27f), new Vector2(7, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 26.99f), new Vector2(7, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(53.5f, 0, 27f), new Vector2(42f, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(53.49f, 0, 27f), new Vector2(41.8f, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(54.5f, 2.71f, 48f), new Vector2(13.7f, 4.75f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(54.49f, 2.71f, 48f), new Vector2(13.7f, 4.75f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); #endregion #region CAFÉ PAVILLON ORDINIQUE //Café pavillon Ordinique Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(56.5f, 0, 48), new Vector2(7, 5.1f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(56.5f, 0, 47.99f), new Vector2(7, 5.1f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(56.5f, 0, 27f), new Vector2(42.1f, 5.1f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(56.5f, 0, 27f), new Vector2(42.1f, 5.1f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(56.5f, 0, 27f), new Vector2(7, 5.1f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(56.5f, 0, 26.99f), new Vector2(7, 5.1f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(56.6f, 0.7f, 40f), new Vector2(2.5f, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(56.4f, 0.7f, 40f), new Vector2(2.5f, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((56.55f), 1.3f, 40f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((56.45f), 1.3f, 40f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); #endregion #region CASIER PAVILLON //CasierPavillon Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(54f, 2.71f, 32f), new Vector2(6, 3), "casier", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(53.5f, 2.71f, 32f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(53.5f, 2.71f, 35f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); //Components.Add(new TuileTexturée(this, 1f, Vector3.Zero, new Vector3(53.5f, 4.21f, 34f), new Vector2(1f, 6f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(54f, 0.7f, 32f), new Vector2(6, 3), "casier", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(53.5f, 0.7f, 32f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(53.5f, 0.7f, 35f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(54f, 0.7f, 38f), new Vector2(6, 3), "casier", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(53.5f, 0.7f, 38f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(53.5f, 0.7f, 41f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(54f, 2.71f, 38f), new Vector2(6, 3), "casier", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(53.5f, 2.71f, 38f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(53.5f, 2.71f, 41f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(54f, 0.7f, 44f), new Vector2(6, 3), "casier", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(53.5f, 0.7f, 44f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(53.5f, 0.7f, 47f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(54f, 2.71f, 44f), new Vector2(6, 3), "casier", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(53.5f, 2.71f, 44f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(53.5f, 2.71f, 47f), new Vector2(1f, 3f), "beige", INTERVALLE_MAJ_STANDARD)); #endregion #region PORTE PAVILLON //PortePavillon Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(53.51f, 0.7f, 30f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(53.48f, 0.7f, 30f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(53.51f, 2.71f, 30f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(53.48f, 2.71f, 30f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(53.51f, 0.7f, 36f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(53.48f, 0.7f, 36f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(53.51f, 2.71f, 36f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(53.48f, 2.71f, 36f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(53.51f, 0.7f, 42f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(53.48f, 0.7f, 42f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(53.51f, 2.71f, 42f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(53.50f, 2.71f, 42f), new Vector2(2, 3), "PortePavillonInterieur", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(54.51f, 2.71f, 53f), new Vector2(2.5f, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(54.48f, 2.71f, 53f), new Vector2(2.5f, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(54.515f, 4.3f, 53.5f), new Vector2(0.5f, 0.1f), "P106", INTERVALLE_MAJ_STANDARD)); #endregion #region Tableau Blanc Pavillon //TableauBlanc Pavillon Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50.75f, 1, 41.98f), new Vector2(4, 3), "TableauBlanc", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50.75f, 1, 33.5f), new Vector2(4, 3), "TableauBlanc", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50.75f, 1, 47.8f), new Vector2(4, 3), "TableauBlanc", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50.75f, 3.21f, 41.98f), new Vector2(4, 3), "TableauBlanc", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50.75f, 3.21f, 33.5f), new Vector2(4, 3), "TableauBlanc", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50.75f, 3.21f, 47.8f), new Vector2(4, 3), "TableauBlanc", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(51.75f, 3.21f, 54.85f), new Vector2(4, 3), "TableauBlanc", INTERVALLE_MAJ_STANDARD)); //Tableau echelard Components.Add(new TuileDiagonalTexturé(this, 1f, Vector3.Zero, new Vector3(50.2f, 3.38f, 53.85f), new Vector2(3f, 3), "ToileProjecteur", INTERVALLE_MAJ_STANDARD)); // Components.Add(new ObjetDeBase(this,"Computer Table",0.0002f,Vector3.Zero,new Vector3(60f, 4f, 60f))); // Components.Add(new ObjetDePatrouille(this, "Computer Table", 1f, new Vector3(0, 0, 0), new Vector3(50.2f, 3.38f, 52.85f), new Vector3(50.2f, 3.38f, 52.85f), 0, 0, INTERVALLE_MAJ_STANDARD)); #endregion #region BAHAYE // //CIEL Components.Add(new Terrain(this, 1f, Vector3.Zero, Vector3.Zero, new Vector3(DIMENSION_TERRAIN , 3, DIMENSION_TERRAIN), "LionelEssai4", "TextureEssai2", 3, INTERVALLE_MAJ_STANDARD)); ////Components.Add(new Terrain(this, 1f, Vector3.Zero, Vector3.Zero, new Vector3(DIMENSION_TERRAIN/5, 10, DIMENSION_TERRAIN/5), "LionelEssai3", "Texture1Essai", 2, INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, new Vector3(0, MathHelper.PiOver2, 0), new Vector3(-DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2, 0), étenduePlan, charpentePlan, "CielGauche", INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, new Vector3(0, -MathHelper.PiOver2, 0), new Vector3(DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2, 0), étenduePlan, charpentePlan, "CielDroite", INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, Vector3.Zero, new Vector3(0, DIMENSION_TERRAIN / 2, -DIMENSION_TERRAIN / 2), étenduePlan, charpentePlan, "CielAvant", INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, new Vector3(0, -MathHelper.Pi, 0), new Vector3(0, DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2), étenduePlan, charpentePlan, "CielArrière", INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, new Vector3(MathHelper.PiOver2, 0, 0), new Vector3(0, DIMENSION_TERRAIN - 1, 0), étenduePlan, charpentePlan, "CielDessus", INTERVALLE_MAJ_STANDARD)); //Components.Add(new ObjetDePatrouille(this, "Computer Table", 0.002f, new Vector3(0, MathHelper.Pi, -MathHelper.PiOver2), positionARC170, positionCylindre1, 36, 6f, INTERVALLE_MAJ_STANDARD)); //Components.Add(new ObjetDePatrouille(this, "Feisar", 0.01f, Vector3.Zero, positionFeisar, positionCylindre2, 24, 8,)); //Components.Add(new ObjetDePatrouille(this, "Airplane_blue", 1f, new Vector3(0, 0, MathHelper.PiOver4), positionBiplan, positionCylindre3, 36, 7, INTERVALLE_MAJ_STANDARD)); //Components.Add(new Cylindre(this, 1f, Vector3.Zero, positionCylindre1, new Vector2(10f, 20f), new Vector2(30, 30), "SQWAD", INTERVALLE_MAJ_STANDARD)); //Components.Add(new Cylindre(this, 1f, new Vector3(0, 0, 0), positionCylindre2, new Vector2(10f, 20f), new Vector2(30, 30), "SQWAD", INTERVALLE_MAJ_STANDARD)); //Components.Add(new Cylindre(this, 1f, Vector3.Zero, positionCylindre3, new Vector2(10f, 20f), new Vector2(30, 30), "SQWAD", INTERVALLE_MAJ_STANDARD)); Components.Add(new AfficheurFPS(this, "Arial20", Color.Gold, INTERVALLE_CALCUL_FPS)); Services.AddService(typeof(Random), new Random()); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); Services.AddService(typeof(RessourcesManager<Model>), GestionnaireDeModèles); Services.AddService(typeof(RessourcesManager<Effect>), GestionnaireDeShaders); Services.AddService(typeof(InputManager), GestionInput); Services.AddService(typeof(Caméra), CaméraJeu); GestionSprites = new SpriteBatch(GraphicsDevice); Services.AddService(typeof(SpriteBatch), GestionSprites); base.Initialize(); }
public override void Initialize() { GestionnaireInput = new InputManager(this.Game); base.Initialize(); }
protected override void Initialize() { const int DIMENSION_TERRAIN = 256; Vector2 étenduePlan = new Vector2(DIMENSION_TERRAIN, DIMENSION_TERRAIN); Vector2 charpentePlan = new Vector2(4, 3); Vector3 positionCaméra = new Vector3(-8, 11, 120); Vector3 cibleCaméra = new Vector3(0, 0, 0); Vector3 positionARC170 = new Vector3(25, 15, 0); Vector3 positionBiplan = new Vector3(20, 10, 0); Vector3 positionFeisar = new Vector3(20, 15, 20); Vector3 positionCylindre1 = new Vector3(-90, 10, -90); Vector3 positionCylindre2 = new Vector3(-20, 10, -20); Vector3 positionCylindre3 = new Vector3(-90, 10, 90); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireDeModèles = new RessourcesManager<Model>(this, "Models"); GestionnaireDeShaders = new RessourcesManager<Effect>(this, "Effects"); GestionInput = new InputManager(this); CaméraJeu = new CaméraSubjective(this, positionCaméra, cibleCaméra, Vector3.Up, INTERVALLE_MAJ_STANDARD); Components.Add(GestionInput); Components.Add(CaméraJeu); Components.Add(new Afficheur3D(this)); //LignePArking Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-6,1,15), new Vector2(1,98), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-30, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-26, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-22, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-18, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-18, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-30, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-26, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-22, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-52, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-48, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-44, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-40, 1, 25), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-40, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-52, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-48, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-44, 1, 43), new Vector2(1, 20), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(20, 1, 25), new Vector2(1, 56), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(35, 1, 25), new Vector2(1, 56), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 25), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 29), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 33), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 37), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 41), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 45), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 49), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(30, 1, 53), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 25), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 29), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 33), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 37), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 41), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 45), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 49), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(15, 1, 53), new Vector2(20, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-52, 1, 30), new Vector2(69, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileColorée(this, 1f, Vector3.Zero, new Vector3(-52, 1, 48), new Vector2(69, 1), Color.Gold, INTERVALLE_MAJ_STANDARD)); //PAVILLON ORDINIQUE Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50,0,21), new Vector2(20, 10), "MurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 55), new Vector2(20, 10), "MurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(50, 0, 21), new Vector2(68, 10), "MurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(60, 0, 21), new Vector2(68, 10), "MurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturée(this, 1f, Vector3.Zero, new Vector3(50, 5, 21), new Vector2(20, 68), "ToitPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f), 0.7f, 25), new Vector2(3,4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f),3, 24.8f), new Vector2(4,2 ), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f), 3, 30.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f), 3, 36.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f), 3, 42.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f), 3, 48.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f), 1.5f, 30.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f), 1.5f, 36.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f), 1.5f, 42.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3((49.99f), 0.7f, 49.1f), new Vector2(3, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 0.7f, 25), new Vector2(3, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 3, 24.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 3, 30.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 3, 36.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 3, 42.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 3, 48.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 1.5f, 30.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 1.5f, 36.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 1.5f, 42.8f), new Vector2(4, 2), "FenetrePavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3((50.2f), 0.7f, 49.1f), new Vector2(3, 4), "PortePavillon", INTERVALLE_MAJ_STANDARD)); //PAVILLON ORDINIQUE INTÉRIEUR -MUR-PLAFOND-PLANCHER Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 0, 54.9f), new Vector2(20, 10), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 21.1f), new Vector2(20, 10), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical3(this, 1f, Vector3.Zero, new Vector3(59.9f, 0, 21), new Vector2(68, 10), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical4(this, 1f, Vector3.Zero, new Vector3(50.1f, 0, 21), new Vector2(68, 10), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturée(this, 1f, Vector3.Zero, new Vector3(50,0.7f, 21.1f), new Vector2(20, 68), "PlancherIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturée(this, 1f, Vector3.Zero, new Vector3(50, 2.85f, 21.1f), new Vector2(20, 68), "PlancherIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéePlafond(this, 1f, Vector3.Zero, new Vector3(50, 2.71f, 21.1f), new Vector2(20, 68), "PlafondPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéePlafond(this, 1f, Vector3.Zero, new Vector3(50, 4.9f, 21.1f), new Vector2(20, 68), "PlafondPavillon", INTERVALLE_MAJ_STANDARD)); //Mur cLASSE Pavillon Ordinique Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 0, 42f), new Vector2(4, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 41.8f), new Vector2(4, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 0, 33.7f), new Vector2(4, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 33.5f), new Vector2(4, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 0,48), new Vector2(4, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 47.8f), new Vector2(4, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical2(this, 1f, Vector3.Zero, new Vector3(50, 0, 27f), new Vector2(4, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); Components.Add(new TuileTexturéeVertical(this, 1f, Vector3.Zero, new Vector3(50, 0, 26.8f), new Vector2(4, 9.9f), "MurIntérieurPavillon", INTERVALLE_MAJ_STANDARD)); //CIEL Components.Add(new Terrain(this, 1f, Vector3.Zero, Vector3.Zero, new Vector3(DIMENSION_TERRAIN , 3, DIMENSION_TERRAIN), "LionelEssai4", "TextureEssai2", 3, INTERVALLE_MAJ_STANDARD)); ////Components.Add(new Terrain(this, 1f, Vector3.Zero, Vector3.Zero, new Vector3(DIMENSION_TERRAIN/5, 10, DIMENSION_TERRAIN/5), "LionelEssai3", "Texture1Essai", 2, INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, new Vector3(0, MathHelper.PiOver2, 0), new Vector3(-DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2, 0), étenduePlan, charpentePlan, "CielGauche", INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, new Vector3(0, -MathHelper.PiOver2, 0), new Vector3(DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2, 0), étenduePlan, charpentePlan, "CielDroite", INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, Vector3.Zero, new Vector3(0, DIMENSION_TERRAIN / 2, -DIMENSION_TERRAIN / 2), étenduePlan, charpentePlan, "CielAvant", INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, new Vector3(0, -MathHelper.Pi, 0), new Vector3(0, DIMENSION_TERRAIN / 2, DIMENSION_TERRAIN / 2), étenduePlan, charpentePlan, "CielArrière", INTERVALLE_MAJ_STANDARD)); Components.Add(new PlanTexturé(this, 1f, new Vector3(MathHelper.PiOver2, 0, 0), new Vector3(0, DIMENSION_TERRAIN - 1, 0), étenduePlan, charpentePlan, "CielDessus", INTERVALLE_MAJ_STANDARD)); ////Components.Add(new ObjetDePatrouille(this, "ARC170", 0.002f, new Vector3(0, MathHelper.Pi, -MathHelper.PiOver2), positionARC170, positionCylindre1, 36, 6f, INTERVALLE_MAJ_STANDARD)); //Components.Add(new ObjetDePatrouille(this, "Feisar", 0.01f, Vector3.Zero, positionFeisar, positionCylindre2, 24, 8, INTERVALLE_MAJ_STANDARD)); //Components.Add(new ObjetDePatrouille(this, "Airplane_blue", 1f, new Vector3(0, 0, MathHelper.PiOver4), positionBiplan, positionCylindre3, 36, 7, INTERVALLE_MAJ_STANDARD)); //Components.Add(new Cylindre(this, 1f, Vector3.Zero, positionCylindre1, new Vector2(10f, 20f), new Vector2(30, 30), "SQWAD", INTERVALLE_MAJ_STANDARD)); //Components.Add(new Cylindre(this, 1f, new Vector3(0, 0, 0), positionCylindre2, new Vector2(10f, 20f), new Vector2(30, 30), "SQWAD", INTERVALLE_MAJ_STANDARD)); //Components.Add(new Cylindre(this, 1f, Vector3.Zero, positionCylindre3, new Vector2(10f, 20f), new Vector2(30, 30), "SQWAD", INTERVALLE_MAJ_STANDARD)); Components.Add(new AfficheurFPS(this, "Arial20", Color.Gold, INTERVALLE_CALCUL_FPS)); Services.AddService(typeof(Random), new Random()); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); Services.AddService(typeof(RessourcesManager<Model>), GestionnaireDeModèles); Services.AddService(typeof(RessourcesManager<Effect>), GestionnaireDeShaders); Services.AddService(typeof(InputManager), GestionInput); Services.AddService(typeof(Caméra), CaméraJeu); GestionSprites = new SpriteBatch(GraphicsDevice); Services.AddService(typeof(SpriteBatch), GestionSprites); base.Initialize(); }
protected override void Initialize() { TAILLE_ÉCRAN = new Vector2(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height); GestionSprites = new SpriteBatch(GraphicsDevice); GestionInput = new InputManager(this); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Font"); GestionnaireDeSongs = new RessourcesManager<Song>(this, "Soundtracks"); GestionnaireDeFX = new RessourcesManager<SoundEffect>(this, "Soundtracks/Default"); ChansonMenuPrincipal = GestionnaireDeSongs.Find("Wake Me Up - Avicii"); MediaPlayer.Play(ChansonMenuPrincipal); MediaPlayer.Volume = 0.25f; MainMenu = new MenuPrincipal(this); SinglePlayerMenu = new MenuJouer(this); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(SpriteBatch), GestionSprites); Services.AddService(typeof(InputManager), GestionInput); Services.AddService(typeof(RessourcesManager<SoundEffect>),GestionnaireDeFX); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); Components.Add(MainMenu); Components.Add(GestionInput); base.Initialize(); }
//void InitialiserAvatars() //{ // ListeAvatar = new List<Avatar_>(); // ListeAvatar.Add(new Avatar_(this, "unicorn", new Vector3(0, 10, -1), 1 / 60f, 1, manager1)); // ListeAvatar.Add(new Avatar_(this, "unicorn", new Vector3(0, 10, -1), 2 / 60f, 2, manager2)); // ListeAvatar.Add( new Avatar_(this, "unicorn", new Vector3(0, 10, -1), 3 / 60f, 2, manager2)); // ListeAvatar.Add(new Avatar_(this, "unicorn", new Vector3(0, 10, -1), 4 / 60f, 2, manager2)); //} /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { NbJoueurs = 2; TestView1 = new Viewport(0, 0, GameConstants.WindowWidth / 2, GameConstants.WindowHeight); TestView2 = new Viewport(GameConstants.WindowWidth / 2, 0, GameConstants.WindowWidth / 2, GameConstants.WindowHeight); ModelManager ManagerDeModele = new ModelManager(this); IOManager manager1 = new IOManager(this,1); IOManager manager2 = new IOManager(this, 2); CubeColoré CubeBlanc = new Sol(this, 1f, Vector3.Zero, Vector3.Zero, Color.White, new Vector3(20, 1, 10), 1 / 60f); CubeColoré CubeRouge = new Sol(this, 1f, Vector3.Zero, new Vector3(0,1,-5), Color.Red, new Vector3(20, 1.5f, 10), 1 / 60f); CubeColoré CubeBleu = new Sol(this, 1f, Vector3.Zero, new Vector3(0, 1, 10), Color.Blue, new Vector3(20, 1.5f, 10), 1 / 60f); CubeColoré CubeSol = new Sol(this, 1f, Vector3.Zero, new Vector3(0, -3, 0), Color.Yellow, new Vector3(200, 2, 200), INTERVALLE_CALCUL_STANDARD); licorne = new Avatar_(this, "cubefache", new Vector3(0, 10, -1), 1 / 60f, 1, manager1); Avatar_ licorne2 = new Avatar_(this, "unicorn", new Vector3(0, 10, -1), 1 / 60f, 2, manager2); ManagerÉcranDEBUG = new ScreenManager(this, Vector2.Zero); Vector3 positionCaméra = new Vector3(10,10,10); Vector3 positionObjet = new Vector3(0, 0, 0); Vector3 rotationObjet = new Vector3(0, MathHelper.PiOver2, 0); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireDeModèles = new RessourcesManager<Model>(this, "Models"); spriteBatch = new SpriteBatch(GraphicsDevice); GestionInput = new InputManager(this); CaméraJeu = new CaméraFixe(this,new Vector3(10,10,10),Vector3.Zero,Vector3.Up); Caméra1 = new CaméraAvatar(this, licorne.Position, Vector3.Up, licorne,TestView1); Caméra2 = new CaméraAvatar(this, licorne.Position, Vector3.Up, licorne2, TestView2); defaut = GraphicsDevice.Viewport; //Components.Add(new ArrièrePlanDéroulant(this, "CielÉtoilé", INTERVALLE_CALCUL_STANDARD)); //Components.Add(new ObjetDeBase(this, "unicorn", 10, rotationObjet, positionObjet)); Components.Add(new AfficheurFPS(this, "Arial20", Color.Chartreuse, INTERVALLE_CALCUL_FPS)); Components.Add(new Afficheur3D(this)); Components.Add(GestionInput); Components.Add(Caméra1); Components.Add(Caméra2); Components.Add(CaméraJeu); //Components.Add(CubeBlanc); //Components.Add(CubeRouge); //Components.Add(CubeBleu); Components.Add(manager1); Components.Add(manager2); Components.Add(ManagerDeModele); //Components.Add(licorne); //Components.Add(licorne2); ManagerDeModele.AjouterModele(CubeBlanc); ManagerDeModele.AjouterModele(CubeBleu); ManagerDeModele.AjouterModele(CubeRouge); ManagerDeModele.AjouterModele(CubeSol); ManagerDeModele.AjouterModele(licorne); ManagerDeModele.AjouterModele(licorne2); ManagerDeModele.AjouterCaméra(Caméra1); ManagerDeModele.AjouterCaméra(Caméra2); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); Services.AddService(typeof(RessourcesManager<Model>), GestionnaireDeModèles); Services.AddService(typeof(InputManager), GestionInput); Services.AddService(typeof(Caméra), CaméraJeu); Services.AddService(typeof(SpriteBatch), spriteBatch); base.Initialize(); ListePhysique = new List<ICollisionable>(); ListePhysique.Add(CubeBlanc as ICollisionable); ListePhysique.Add(CubeRouge as ICollisionable); ListePhysique.Add(licorne as ICollisionable); ListePhysique.Add(CubeBleu as ICollisionable); ListePhysique.Add(licorne2 as ICollisionable); ListePhysique.Add(CubeSol as ICollisionable); ManagerÉcranDEBUG.Initialize(); ManagerÉcranDEBUG.AjouterItem(licorne); ManagerÉcranDEBUG.AjouterItem(licorne2); CubeBlanc.InitialiserSommets(Color.White); CubeBleu.InitialiserSommets(Color.Blue); CubeRouge.InitialiserSommets(Color.Red); }
public override void Initialize() { GestionInput = Jeu.Services.GetService(typeof(InputManager)) as InputManager; base.Initialize(); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { s = new Shutter(this, "Shutter", INTERVALLE_CALCUL_STANDARD); NbJoueurs = 2; ListeAvatar = new List<Avatar>(); terrain = new Map(this, new Vector3(10,0,10), Vector3.Zero); ListeManagerControle = new List<IOManager>(); ListeCaméraAvatars = new List<Caméra>(); ModelManager ManagerDeModele = new ModelManager(this); GestionnaireGameState = new GamestateManager(this); ManagerÉcranDEBUG = new ScreenManager(this, Vector2.Zero); ViewPortDefaut = GraphicsDevice.Viewport; CaméraJeu = new CaméraFixe(this, new Vector3(10, 10, 10), Vector3.Zero, Vector3.Up); GénérerViewports(NbJoueurs); for (int i = 0; i < NbJoueurs; ++i) { ListeManagerControle.Add(new IOManager(this, ListePlayerIndex[i],INTERVALLE_CALCUL_STANDARD)); } for (int i = 0; i < NbJoueurs; ++i) { ListeAvatar.Add(new Avatar(this, Content.Load<DescriptionAvatar>("Descriptions/Avatar" + i), ListePlayerIndex[i], ListeManagerControle[i])); } for (int i = 0; i < NbJoueurs; ++i) { ListeCaméraAvatars.Add(new CaméraAvatar(this, ListeAvatar[i].Position, Vector3.Up, ListeAvatar[i] as Avatar, ListeViewports[i])); } CubeColoré CubeBlanc = new Sol(this, 1f, new Vector3(0, 0, 0.2f), Vector3.Zero, Color.White, new Vector3(50, 2, 10), 1 / 60f); CubeColoré CubeRouge = new Sol(this, 1f, new Vector3(0, 0, 0f), new Vector3(0, 3, -5), Color.Red, new Vector3(20, 2f, 10), 1 / 60f); CubeColoré CubeBleu = new Sol(this, 1f, new Vector3(0, 0, 0f), new Vector3(0, 1f, 10), Color.Blue, new Vector3(20, 2f, 10), 1 / 60f); CubeColoré CubeSol = new Sol(this, 1f, new Vector3(0f, 0, 0f), new Vector3(0, -1, 0), Color.Yellow, new Vector3(200, 2, 200), INTERVALLE_CALCUL_STANDARD); //CubeColoré testCollision = new Sol(this, 1, Vector3.Zero, new Vector3(0, -1, 0), Color.Aqua, new Vector3(4, 2, 4), INTERVALLE_CALCUL_STANDARD); terrain.Initialize(); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireDeModèles = new RessourcesManager<Model>(this, "Models"); spriteBatch = new SpriteBatch(GraphicsDevice); GestionInput = new InputManager(this); //Components.Add(new AfficheurFPS(this, "Arial20", Color.Chartreuse, INTERVALLE_CALCUL_FPS)); Components.Add(new Afficheur3D(this)); Components.Add(GestionInput); Components.Add(CaméraJeu); Components.Add(ManagerDeModele); Components.Add(GestionnaireGameState); Components.Add(terrain); Components.Add(s); foreach (IOManager i in ListeManagerControle) Components.Add(i); foreach (Caméra c in ListeCaméraAvatars) Components.Add(c); ManagerDeModele.AjouterAvatars(ListeAvatar); ManagerDeModele.AjouterCaméra(ListeCaméraAvatars); ManagerDeModele.AjouterModele(CubeBlanc); ManagerDeModele.AjouterModele(CubeBleu); ManagerDeModele.AjouterModele(CubeRouge); //ManagerDeModele.AjouterModele(testCollision); ManagerDeModele.AjouterModele(CubeSol); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); Services.AddService(typeof(RessourcesManager<Model>), GestionnaireDeModèles); Services.AddService(typeof(InputManager), GestionInput); Services.AddService(typeof(Caméra), CaméraJeu); Services.AddService(typeof(SpriteBatch), spriteBatch); ListePhysique = new List<ICollisionable>(); foreach (Avatar a in ListeAvatar) ListePhysique.Add(a as ICollisionable); ListePhysique.Add(CubeBlanc as ICollisionable); ListePhysique.Add(CubeRouge as ICollisionable); ListePhysique.Add(CubeBleu as ICollisionable); ListePhysique.Add(CubeSol as ICollisionable); //ListePhysique.Add(testCollision as ICollisionable); Grille = new Grid(new Vector3(50, -8f, 50), 0.5f, this); //for (int i = 0; i < 1; i++) //{ // Ennemi ennemi = new Ennemi(this, "unicorn", new Vector3(i, 2, i), new Vector3(1, 2, 1), INTERVALLE_CALCUL_STANDARD, 0.5f, GameConstants.ViePersonnageMax, ListeAvatar, grille, i, new Vector3[8]);//, path); // ManagerDeModele.AjouterModele(ennemi); // ListePhysique.Add(ennemi as ICollisionable); // if (i == 0) // { // Ennemi = ennemi; // } //} Bazooka Bazooka = new Bazooka(this, "Bazooka", new Vector3(0, 2, 0), Vector3.One, 0.05f); SupportFusil SupportFusil = new SupportFusil(this, "SupportFusil", new Vector3(0, 10, 0), Vector3.One, 0.05f, Bazooka); ManagerDeModele.AjouterModele(Bazooka); ManagerDeModele.AjouterModele(SupportFusil); ListePhysique.Add(Bazooka as ICollisionable); ListePhysique.Add(SupportFusil as ICollisionable); foreach (Sol objet in terrain.ListeObjets) { ManagerDeModele.AjouterModele(objet as IModele3d); ListePhysique.Add(objet as ICollisionable); } base.Initialize(); ManagerÉcranDEBUG.Initialize(); foreach (Avatar a in ListeAvatar) ManagerÉcranDEBUG.AjouterItem(a); CubeBlanc.InitialiserSommets(Color.White); CubeBleu.InitialiserSommets(Color.Blue); CubeRouge.InitialiserSommets(Color.Red); //testCollision.InitialiserSommets(Color.Red); }
void InitializeComponents() { GestionInput = new InputManager(Game); CaméraJoueur = new CaméraSubjective(Game, new Vector3(positionObjet.X, positionObjet.Y + HAUTEUR_CAM_DÉFAULT, positionObjet.Z + DISTANCE_POURSUITE), new Vector3(positionObjet.X, positionObjet.Y + 4, positionObjet.Z), Vector3.Up, INTERVALLE_MAJ_STANDARD); Game.Components.Add(CaméraJoueur); TerrainJeu = new Terrain(Game, 1f, Vector3.Zero, Vector3.Zero, new Vector3(256, 25, 256), "PetiteCarte", "DétailsDésert", 3, INTERVALLE_MAJ_STANDARD); Utilisateur = new Joueur(Game, NomModèleJoueur, ÉCHELLE_OBJET, rotationObjet, positionObjet, INTERVALLE_MAJ_STANDARD); if (Game.Services.GetService(typeof(Joueur)) == null) { Game.Services.AddService(typeof(Joueur), Utilisateur); } GestionEnnemis = new GestionnaireEnnemis(Game, Utilisateur, TerrainJeu, NbEnnemis, ÉCHELLE_OBJET, INTERVALLE_MAJ_STANDARD); MenuPause = new MenuPause(Game, ListeGameComponentsMenu, ListeGameComponents, GestionEnnemis); PremierPlan = new PlanTexturé(Game, 1f, Vector3.Zero, new Vector3(0, 6, -126), new Vector2(256, 60), new Vector2(10, 10), "desertDunes", INTERVALLE_MAJ_STANDARD); DeuxièmePlan = new PlanTexturé(Game, 1f, new Vector3(0, MathHelper.PiOver2, 0), new Vector3(-126, 6, 0), new Vector2(256, 60), new Vector2(10, 10), "desertDunesRéflexion", INTERVALLE_MAJ_STANDARD); TroisièmePlan = new PlanTexturé(Game, 1f, new Vector3(0, -(MathHelper.PiOver2), 0), new Vector3(126, 6, 0), new Vector2(256, 60), new Vector2(10, 10), "desertDunesRéflexion", INTERVALLE_MAJ_STANDARD); QuatrièmePlan = new PlanTexturé(Game, 1f, new Vector3(0, MathHelper.Pi, 0), new Vector3(0, 6, 126), new Vector2(256, 60), new Vector2(10, 10), "desertDunes", INTERVALLE_MAJ_STANDARD); Ciel = new PlanTexturé(Game, 1f, new Vector3(MathHelper.PiOver2, 0, 0), new Vector3(0, 35, 0), new Vector2(256, 256), new Vector2(10, 10), "ciel", INTERVALLE_MAJ_STANDARD); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { NbJoueurs = 2; ListeAvatar = new List<Avatar>(); ListeManagerControle = new List<IOManager>(); ListeCaméraAvatars = new List<Caméra>(); ModelManager ManagerDeModele = new ModelManager(this); ManagerÉcranDEBUG = new ScreenManager(this, Vector2.Zero); ViewPortDefaut = GraphicsDevice.Viewport; CaméraJeu = new CaméraFixe(this, new Vector3(10, 10, 10), Vector3.Zero, Vector3.Up); GénérerViewports(NbJoueurs); for (int i = 0; i < NbJoueurs; ++i) { ListeManagerControle.Add(new IOManager(this, i+1)); } for (int i = 0; i < NbJoueurs; ++i) { ListeAvatar.Add(new Avatar(this, "unicorn", PositionAvatars[i], new Vector3(1, 1, 1), INTERVALLE_CALCUL_STANDARD, GameConstants.ViePersonnageMax, i+1, ListeManagerControle[i])); } for (int i = 0; i < NbJoueurs; ++i) { ListeCaméraAvatars.Add(new CaméraAvatar(this, ListeAvatar[i].Position, Vector3.Up, ListeAvatar[i] as Avatar, ListeViewports[i])); } CubeColoré CubeBlanc = new Sol(this, 1f, Vector3.Zero, Vector3.Zero, Color.White, new Vector3(20, 2, 10), 1 / 60f); CubeColoré CubeRouge = new Sol(this, 1f, Vector3.Zero, new Vector3(0, 1, -5), Color.Red, new Vector3(20, 2f, 10), 1 / 60f); CubeColoré CubeBleu = new Sol(this, 1f, Vector3.Zero, new Vector3(0, 1f, 10), Color.Blue, new Vector3(20, 2f, 10), 1 / 60f); CubeColoré CubeSol = new Sol(this, 1f, Vector3.Zero, new Vector3(0, -1, 0), Color.Yellow, new Vector3(200, 2, 200), INTERVALLE_CALCUL_STANDARD); CubeColoré testCollision = new Sol(this, 1, Vector3.Zero, new Vector3(0, -1, 0), Color.Aqua, new Vector3(4, 2, 4), INTERVALLE_CALCUL_STANDARD); GestionnaireDeFonts = new RessourcesManager<SpriteFont>(this, "Fonts"); GestionnaireDeTextures = new RessourcesManager<Texture2D>(this, "Textures"); GestionnaireDeModèles = new RessourcesManager<Model>(this, "Models"); spriteBatch = new SpriteBatch(GraphicsDevice); GestionInput = new InputManager(this); Components.Add(new AfficheurFPS(this, "Arial20", Color.Chartreuse, INTERVALLE_CALCUL_FPS)); Components.Add(new Afficheur3D(this)); Components.Add(GestionInput); Components.Add(CaméraJeu); Components.Add(ManagerDeModele); foreach (IOManager i in ListeManagerControle) Components.Add(i); foreach (Caméra c in ListeCaméraAvatars) Components.Add(c); ManagerDeModele.AjouterAvatars(ListeAvatar); ManagerDeModele.AjouterCaméra(ListeCaméraAvatars); ManagerDeModele.AjouterModele(CubeBlanc); ManagerDeModele.AjouterModele(CubeBleu); ManagerDeModele.AjouterModele(CubeRouge); ManagerDeModele.AjouterModele(testCollision); ManagerDeModele.AjouterModele(CubeSol); Services.AddService(typeof(RessourcesManager<SpriteFont>), GestionnaireDeFonts); Services.AddService(typeof(RessourcesManager<Texture2D>), GestionnaireDeTextures); Services.AddService(typeof(RessourcesManager<Model>), GestionnaireDeModèles); Services.AddService(typeof(InputManager), GestionInput); Services.AddService(typeof(Caméra), CaméraJeu); Services.AddService(typeof(SpriteBatch), spriteBatch); base.Initialize(); ListePhysique = new List<ICollisionable>(); foreach(Avatar a in ListeAvatar) ListePhysique.Add(a as ICollisionable); ListePhysique.Add(CubeBlanc as ICollisionable); ListePhysique.Add(CubeRouge as ICollisionable); ListePhysique.Add(CubeBleu as ICollisionable); ListePhysique.Add(CubeSol as ICollisionable); ListePhysique.Add(testCollision as ICollisionable); ManagerÉcranDEBUG.Initialize(); foreach (Avatar a in ListeAvatar) ManagerÉcranDEBUG.AjouterItem(a); CubeBlanc.InitialiserSommets(Color.White); CubeBleu.InitialiserSommets(Color.Blue); CubeRouge.InitialiserSommets(Color.Red); testCollision.InitialiserSommets(Color.Red); }