public void loadMap2() { this.hud.timer = 180; this.vie = 100; this.tailleLabyL = 20; this.tailleLabyC = 20; labyrinthe = new Laby_Dessins_Collisions(this.tailleLabyL, this.tailleLabyC, 10, 4, this, this.tailleMurs); //labyrinthe 20*20 avec 10 portes avec 7 types de conversion différents pour les portes et taille murs = 3 Color[] floorColor = new Color[2] { Color.DarkRed, Color.White }; this.floor = new Floor(this, this.tailleMurs * this.tailleLabyL, this.tailleMurs * this.tailleLabyC, floorColor); this.Components.Remove(cubeFin); this.cubeFin = new Cube3DTex(this, "", new Vector3((this.tailleLabyL * this.tailleMurs) - 1.5f, 1.0f, (this.tailleLabyC * this.tailleMurs) - 1.5f), new Vector3(0, 0, 0), 0.5f); this.Components.Add(cubeFin); this.camera3D = new Camera3D(this, new Vector3(1.0f, 2.0f, 1.0f), Vector3.Zero, 8f); this.code = ""; 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() { r = new Random(); this.vie = 100; this.tailleLabyL = 10; this.tailleLabyC = 10; this.tailleMurs = 3; labyrinthe = new Laby_Dessins_Collisions(this.tailleLabyL, this.tailleLabyC, 5, 4, this, this.tailleMurs); //labyrinthe 10*10 avec 5 portes avec 4 types de conversion différents pour les portes et taille murs = 3 this.camera3D = new Camera3D(this, new Vector3(1.0f, 2.0f, 1.0f), Vector3.Zero, 8f); this.cubeFin = new Cube3DTex(this, "", new Vector3((this.tailleLabyL * this.tailleMurs) - 1.5f, 1.0f, (this.tailleLabyC * this.tailleMurs) - 1.5f), new Vector3(0, 0, 0), 0.5f); this.Components.Add(cubeFin); Color[] floorColor = new Color[2] { Color.White, Color.Black }; this.floor = new Floor(this, this.tailleMurs * this.tailleLabyL, this.tailleMurs * this.tailleLabyC, floorColor); this.effect = new BasicEffect(GraphicsDevice); this.code = ""; this.lastPressedKeys = new Keys[0]; this.map = new Minimap(this, 400); this.hud = new HUD(this); base.Initialize(); }