public Param_Map(bool[,] liste, bool[,] liste_projectile, List <Spawn> liste_spawn, List <DestructibleItems> liste_barrel, Spawn_Items liste_caisses, int x, int y, int texture_map, int hauteur, int largeur, CheckPoint checkpointArrivee, CheckPoint checkpointBossEntry, bool scrolling) { this.liste = liste; this.liste_projectile = liste_projectile; this.liste_spawn = liste_spawn; this.liste_barrel = liste_barrel; this.liste_caisses = liste_caisses; this.x = x; this.y = y; this.texture_map = texture_map; this.hauteur = hauteur; this.largeur = largeur; this.checkpointArrivee = checkpointArrivee; this.checkpointBossEntry = checkpointBossEntry; this.scrolling = scrolling; }
public static void lecture_caisses(StreamReader lecture) { List <Vector2> liste_caisses_ = new List <Vector2>(); string ligne = lecture.ReadLine(); while (ligne != "//") { ligne = lecture.ReadLine(); int x = System.Convert.ToInt32(ligne); ligne = lecture.ReadLine(); int y = System.Convert.ToInt32(ligne); liste_caisses_.Add(new Vector2(x, y)); ligne = lecture.ReadLine(); } liste_caisses = new Spawn_Items(liste_caisses_); }
public static void lecture_caisses(StreamReader lecture) { List<Vector2> liste_caisses_ = new List<Vector2>(); string ligne = lecture.ReadLine(); while (ligne != "//") { ligne = lecture.ReadLine(); int x = System.Convert.ToInt32(ligne); ligne = lecture.ReadLine(); int y = System.Convert.ToInt32(ligne); liste_caisses_.Add(new Vector2(x, y)); ligne = lecture.ReadLine(); } liste_caisses = new Spawn_Items(liste_caisses_); }
public Param_Map(bool[,] liste, bool[,] liste_projectile, List<Spawn> liste_spawn, List<DestructibleItems> liste_barrel, Spawn_Items liste_caisses, int x, int y, int texture_map, int hauteur, int largeur, CheckPoint checkpointArrivee, CheckPoint checkpointBossEntry, bool scrolling) { this.liste = liste; this.liste_projectile = liste_projectile; this.liste_spawn = liste_spawn; this.liste_barrel = liste_barrel; this.liste_caisses = liste_caisses; this.x = x; this.y = y; this.texture_map = texture_map; this.hauteur = hauteur; this.largeur = largeur; this.checkpointArrivee = checkpointArrivee; this.checkpointBossEntry = checkpointBossEntry; this.scrolling = scrolling; }
// CONSTRUCTOR public Map(Param_Map parametre) { this.parametre = parametre; MapTexture = new Rectangle(0, 0, parametre.hauteur * 16, (parametre.largeur - 1) * 16); this.map_physique = new PhysicsEngine(parametre.liste, parametre.liste_projectile); this.liste_ia = new List<IA>(); if (parametre.texture_map == 3) { Player p1 = new Player(Keys.Up, Keys.Down, Keys.Left, Keys.Right, Keys.N, Keys.P, Keys.Enter, Keys.T, Ressources.Player1, parametre.x, parametre.y); Player p2 = new Player(Keys.Z, Keys.S, Keys.Q, Keys.D, Keys.A, Keys.E, Keys.R, Keys.W, Ressources.Player2, parametre.x, parametre.y); p1.bomb = 5; p2.bomb = 5; liste_joueurs.Add(p1); liste_joueurs.Add(p2); } else { this.liste_joueurs.Add(new Player(Keys.Up, Keys.Down, Keys.Left, Keys.Right, Keys.N, Keys.P, Keys.Enter, Keys.T, Ressources.Player1, parametre.x, parametre.y)); } //HEALTH + AMMO BOXES this.liste_box = new List<Items>(); this.liste_box2 = new List<Items>(); //EXPLOSIVE BOXES this.liste_barrel = new List<DestructibleItems>(); this.liste_barrel = parametre.liste_barrel; //EXPLOSION PARTICULE this.liste_explosions = new List<ParticuleExplosion>(); this.liste_explosions2 = new List<ParticuleExplosion>(); this.liste_explosions3 = new List<ParticuleExplosion>(); this.explosionTexture = Ressources.ExplosionParticule; //BLOOD PARTICULE this.liste_blood = new List<ParticuleExplosion>(); this.liste_blood2 = new List<ParticuleExplosion>(); //TURRETS this.liste_turret = new List<Turret>(); this.liste_turret2 = new List<Turret>(); //RAIN (que sur la map01) this.liste_rain = new List<ParticuleRain>(); this.rainTexture = Ressources.mRain; this.spawns = parametre.liste_spawn; this.spawn_items = parametre.liste_caisses; this.liste_clavier = new List<Keys>(); this.liste_clavier_2 = new List<Keys>(); fin_niveau = parametre.checkpointArrivee; boss_entry = parametre.checkpointBossEntry; //Client.initialisationClient(4242); //Serveur.intialisationServeur(1338); }