Ejemplo n.º 1
0
        public Inventaire(ContentManager Content, Player player)
        {
            font2      = Tools.LoadFont("Fonts/AngryBirds/44", Content);
            font       = Tools.LoadFont("Fonts/AngryBirds/24", Content);
            ButList    = new List <Button>();
            weaponList = new List <Weapon>();
            AllWeapon  = new List <Weapon>();
            butAllWeap = new List <Button>();
            butChar1   = new Button(TexturesGame.PlayerTab[0][0]);
            butChar1.setPositionAndColor(new Vector2(1400, 580), Color.White);
            butChar2 = new Button(TexturesGame.PlayerTab[1][0]);
            butChar2.setPositionAndColor(new Vector2(1500, 580), Color.White);
            inventaryWeapons = new ListView(Tools.LoadTexture("HUD/HUD_armes", Content), new Vector2(100, 300), font, Color.Black, 5);
            shopWeapons      = new ListView(Tools.LoadTexture("HUD/HUD_armes", Content), new Vector2(800, 300), font, Color.Black, 5);
            List <Weapon> temp = LoadWeapons.AllWeapon(Content);

            butLifes = new Button(Tools.LoadTexture("Item/coeur", Content));
            butLifes.setPositionAndColor(new Vector2(1500, 300), Color.Black);

            for (int i = 0; i < temp.Count; i++)
            {
                bool test = false;
                for (int j = 0; j < player.ItemList.Count; j++)
                {
                    test = test || (temp[i].name == player.ItemList[j].name);
                }
                if (!test)
                {
                    AllWeapon.Add(temp[i]);
                }
            }
            for (int i = 0; i < player.ItemList.Count; i++)
            {
                if (player.ItemList[i].GetType() == typeof(Weapon))
                {
                    weaponList.Add((Weapon)player.ItemList[i]);
                }
            }
            for (int i = 0; i < weaponList.Count; i++)
            {
                inventaryWeapons.defaultCell = Tools.LoadTexture("Weapons/WeaponSprite/" + weaponList[i].weaponName, Content);
                inventaryWeapons.AddCell(new string[] { weaponList[i].weaponName + " :  " + weaponList[i].munitions + "-" + weaponList[i].prix / 10 + "J" }, new int[] { 200 }, 10);
            }
            for (int i = 0; i < AllWeapon.Count; i++)
            {
                shopWeapons.defaultCell = Tools.LoadTexture("Weapons/WeaponSprite/" + AllWeapon[i].weaponName, Content);
                shopWeapons.AddCell(new string[] { AllWeapon[i].weaponName + " :  " + AllWeapon[i].prix + Langage.getString(Langage.langueactuelle, 39) }, new int[] { 200 }, 10);
            }
        }
Ejemplo n.º 2
0
 public static void IASurvival(Enemy Glandu, Player player, int dist, Shot shots, int offsetX, int offsetY, Sound sound, ContentManager Content, Map mapWorld, List <Enemy> Enemys)
 {
     IAModSnDestroy(Glandu, player, dist, shots, offsetX, offsetY, sound);
     Glandu.iaType = IAType.Survival;
     if (Player1Events.SurvivalLvL0 > 3)
     {
         Glandu.currentWeapon        = LoadWeapons.LoadLanceFlamme(Content);
         Glandu.defense              = 0.5f;
         Glandu.currentWeapon.damage = (int)Player1Events.SurvivalLvL0 / 10 * Glandu.currentWeapon.damage + 50;
     }
     if (Player1Events.SurvivalLvL0 > 10)
     {
         Glandu.currentWeapon = LoadWeapons.LoadNeedler(Content);
         Glandu.defense       = 0.2f;
     }
     Glandu.defense = 2 / ((int)Player1Events.SurvivalLvL0 + 1);
     Glandu.currentWeapon.damage = (int)Player1Events.SurvivalLvL0 * 20 + 20;
 }
Ejemplo n.º 3
0
        protected override void LoadContent()
        {
            sbHUD               = new SpriteBatch(GraphicsDevice);
            spriteBatch         = new SpriteBatch(GraphicsDevice);
            spriteBatchMini     = new SpriteBatch(GraphicsDevice);
            spriteBatchMini2    = new SpriteBatch(GraphicsDevice);
            destrucTileList     = new List <Vector3>();
            entityList          = new List <Entity>();
            animationList       = new List <Animate>();
            particlesEngineList = new List <ParticleEngine>();
            particleList        = new List <Particles>();
            explosionReseau     = new List <Vector2>();

            switch (gameState)
            {
            case GameState.initialize:
                //Load Cursor Texture and Position

                personalFolder           = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "TDZ";
                cursor                   = Tools.LoadTexture("Others/cursor", Content);
                controles.cursorPosition = new Vector2();
                Langage.LoadLanguage();
                destroyTile = Tools.LoadTexture("SpriteTexture/destroyed", Content);

                #region Load Textures

                TexturesGame.LoadAmmo(Content);
                TexturesGame.LoadPlayers(Content);
                TexturesGame.LoadArmes(Content);
                TexturesGame.LoadItem(Content);
                TexturesGame.LoadImpact(Content);
                TexturesGame.Loadtest(Content);
                TexturesGame.LoadBonus(Content);
                TexturesGame.LoadIAs(Content);
                TexturesGame.LoadPlatForm(Content);
                TexturesGame.Loadtest(Content);
                TexturesGame.LoadSpeedUp(Content);
                TexturesGame.LoadBackgrounds(Content);

                #endregion Load Textures

                menu      = new Menu(Content, GraphicsDevice);
                font      = Tools.LoadFont("Fonts/AngryBirds/24", Content);
                GameOver  = Tools.LoadTexture("Menu/GameOver", Content);
                fondRadar = Tools.LoadTexture("Others/fondRadar", Content);
                HUDarmes  = Tools.LoadTexture("HUD/HUD_armes", Content);
                gameState = GameState.menu;
                sound     = new Sound(Content);

                Player player = new Player(new Vector2(0, 0), TexturesGame.PlayerTab[0], 0, GraphicsDevice, LoadWeapons.LoadKnife(Content), true, FlagsType.blue);
                menu = new Menu(Content, GraphicsDevice);
                try
                {
                    XmlSerializer serializer = new XmlSerializer(typeof(Opt));
                    FileStream    fs         = new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/TDZ/Options/OptionMenu", FileMode.Open);
                    XmlReader     reader     = XmlReader.Create(fs);
                    Opt           obj        = (Opt)serializer.Deserialize(reader);
                    fullScreenON = obj.Fullscreen;
                    menu.optionsMenu.toFullScreen = obj.Fullscreen;
                    soundON                = obj.SoundOn;
                    sound.playEffects      = soundON;
                    controles.controleTab  = obj.controleTab;
                    Langage.langueactuelle = obj.language;

                    if (obj.masterServerAdress != null)
                    {
                        ConnectMaster.MasterIPAdress = obj.masterServerAdress;
                    }
                    fs.Close();

                    XmlSerializer serializer2 = new XmlSerializer(typeof(SavPerso));
                    FileStream    fs2         = new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/TDZ/Sauvegardes/" + obj.name, FileMode.Open);
                    XmlReader     reader2     = XmlReader.Create(fs2);
                    SavPerso      obj2        = (SavPerso)serializer2.Deserialize(reader2);
                    player.Deserialise(obj2, Content);
                    fs2.Close();
                }
                catch (Exception)
                {
                    player = new Player(new Vector2(0, 0), TexturesGame.PlayerTab[0], 0, GraphicsDevice, LoadWeapons.LoadKnife(Content), true, FlagsType.blue);
                    player.ItemList.Add(LoadWeapons.LoadKnife(Content));
                }
                currentPlayer = player;
                solo          = new Solo(player.currentLevel, player);
                menu.LaunchMenuSound(sound);
                break;

            case GameState.editor:

                sound.soundPlayer.Stop();

                // Prepare the process to run
                ProcessStartInfo start = new ProcessStartInfo();
                // Enter the executable to run, including the complete path
                start.FileName = "./MapEditor.exe";
                // Do you want to show a console window?
                start.WindowStyle    = ProcessWindowStyle.Hidden;
                start.CreateNoWindow = true;

                // Run the external process & wait for it to finish
                using (Process proc = Process.Start(start))
                {
                    proc.WaitForExit();
                }


                gameState = GameState.menu;
                menu      = new Menu(Content, GraphicsDevice);
                menu.LaunchMenuSound(sound);
                break;

            case GameState.solo:

                sound.soundPlayer.Stop();

                //Load List Tirs and Texture
                shotsPlayer = new Shot();

                //Load Map
                LoadMap(menu.mapname + ".xml");
                LoadMapTextures();

                //Load Player Array
                hostPlayer = 0;
                LoadPlayer();
                players[hostPlayer].position = mapWorld.spawnPoint;
                players[hostPlayer].image    = TexturesGame.PlayerTab[players[hostPlayer].spritePerso];
                // LoadEnemy();
                LoadSurvivalEnemy();
                LoadItem();

                //Load HUD
                LoadHUD();

                background = new Background(Content, mapWorld);
                camera     = new Camera(players, hostPlayer, scaleNormValue, GraphicsDevice, mapWorld);

                break;

            case GameState.scenario:

                sound.soundPlayer.Stop();

                //Load List Tirs and Texture
                shotsPlayer = new Shot();

                //Load Map
                LoadMap(solo.currentMap + ".xml");
                LoadMapTextures();

                //Load Player Array
                solo.player.position = mapWorld.spawnPoint;
                hostPlayer           = 0;
                players = new List <Player>();
                players.Add(solo.player);
                entityList.Add(solo.player);

                Enemys = new List <Enemy>();

                for (int i = 0; i < mapWorld.IASpawnList.Count; i++)
                {
                    Enemys.Add(new Enemy(mapWorld.IASpawnList[i], TexturesGame.IATab[0], 100 + i, Content, LoadWeapons.LoadIAGun(Content), false, 0, GraphicsDevice));
                    Enemys[i].iaType = IAType.patrouille;
                    entityList.Add(Enemys[i]);
                    Enemys[i].attaque = currentPlayer.niveau * 0.1f;
                    Enemys[i].defense = 2 / currentPlayer.niveau;
                }

                LoadItem();

                //Load HUD
                LoadHUD();

                background = new Background(Content, mapWorld);
                camera     = new Camera(players, hostPlayer, scaleNormValue, GraphicsDevice, mapWorld);

                break;

            case GameState.multi:
                sound.soundPlayer.Stop();

                //Launch Network and Load Map
                mapWorld = new Map();
                client   = new Client(ConnectMaster.MasterIPAdress, Convert.ToInt32(menu.multiMenu.tmpserv.port), ref hostPlayer, mapWorld, Content, menu.multiMenu.tmpserv.mode);

                if (client.mode == ModeMulti.ctf)
                {
                    flags    = new Flag[2];
                    flags[0] = new Flag(mapWorld.drapeau2, Content, FlagsType.red);
                    flags[1] = new Flag(mapWorld.drapeau1, Content, FlagsType.blue);
                    foreach (Flag item in flags)
                    {
                        mapWorld.itemList.Add(item);
                    }
                }

                LoadMapTextures();

                //Platforms
                for (int i = 0; i < mapWorld.platFormList.Count; i++)
                {
                    entityList.Add(mapWorld.platFormList[i]);
                }

                //Load List Tirs and Texture
                shotsPlayer = new Shot();

                //Load Player Array
                LoadPlayer();
                SetCurrentPlayer();
                Enemys = new List <Enemy>();

                //Load HUD
                LoadHUD();

                background = new Background(Content, mapWorld);
                camera     = new Camera(players, hostPlayer, scaleNormValue, GraphicsDevice, mapWorld);

                break;

            default:
                break;
            }
        }
Ejemplo n.º 4
0
 private void LoadSurvival(List <Enemy> Enemys)
 {
     if (Player1Events.SurvivalLvl1 == Player1Events.SurvivalLvL0 && Player1Events.SurvivalLvl1 > 0 && Enemys.Count < 20)
     {
         for (int i = 0; i < 2; i++)
         {
             Enemys.Capacity++;
             Enemys.Add(new Enemy(mapWorld.IASpawnList[Enemys.Count % mapWorld.IASpawnList.Count], TexturesGame.IATab[0], 100 + Enemys.Count, Content, LoadWeapons.LoadIAGun(Content), true, 0, GraphicsDevice));
             entityList.Capacity++;
             entityList.Add(Enemys[Enemys.Count - 1]);
         }
         Player1Events.SurvivalLvl1++;
     }
 }
Ejemplo n.º 5
0
        private void LoadSurvivalEnemy()
        {
            Enemys = new List <Enemy>();
            int nbIa = 0;

            if (mapWorld.IASpawnList.Count > 2)
            {
                nbIa = 2;
            }
            else
            {
                nbIa = mapWorld.IASpawnList.Count;
            }

            for (int i = 0; i < nbIa; i++)
            {
                Enemys.Add(new Enemy(mapWorld.IASpawnList[i], TexturesGame.IATab[0], 100 + i, Content, LoadWeapons.LoadIAGun(Content), true, 0, GraphicsDevice));
                entityList.Add(Enemys[i]);
            }
        }
Ejemplo n.º 6
0
        private void LoadEnemy()
        {
            Enemys = new List <Enemy>();

            for (int i = 0; i < 2; i++) ///!
            {
                Enemys.Add(new Enemy(mapWorld.IASpawnList[i], TexturesGame.IATab[0], 100 + i, Content, LoadWeapons.LoadIAGun(Content), true, 0, GraphicsDevice));
            }
        }
Ejemplo n.º 7
0
        private void LoadPlayer()
        {
            players = new List <Player>();
            int i;

            for (i = 0; i < hostPlayer; i++)
            {
                Player player;
                if (i % 2 == 0)
                {
                    player = new Player(mapWorld.spawnPoint2, TexturesGame.PlayerTab[0], players.Count, GraphicsDevice, LoadWeapons.LoadKnife(Content), true, FlagsType.red);
                }
                else
                {
                    player = new Player(mapWorld.spawnPoint, TexturesGame.PlayerTab[1], players.Count, GraphicsDevice, LoadWeapons.LoadKnife(Content), true, FlagsType.blue);
                }
                players.Add(player);
                entityList.Add(player);
            }
            currentPlayer.id = i + 1;
            players.Add(currentPlayer);
            entityList.Add(currentPlayer);
        }
Ejemplo n.º 8
0
        public void Update(ref Player player, double mousseCoef, Controles controles, ContentManager content, GraphicsDevice graphics)
        {
            switch (state)
            {
            case SubGestion.fichePerso:
                butAttaque.Update(mousseCoef, controles);
                butDefense.Update(mousseCoef, controles);
                butDext.Update(mousseCoef, controles);
                butPv.Update(mousseCoef, controles);
                butVitesse.Update(mousseCoef, controles);
                butInventaire.Update(mousseCoef, controles);
                butLoad.Update(mousseCoef, controles);

                if (butAttaque.isCliked)
                {
                    butAttaque.isCliked = false;
                    if (player.pointRestants > 0)
                    {
                        player.attaquePoint++;
                        if (player.attaque < 3)
                        {
                            player.attaque *= 1.1f;
                        }
                        player.pointRestants--;
                    }
                }
                if (butDefense.isCliked)
                {
                    butDefense.isCliked = false;
                    if (player.pointRestants > 0)
                    {
                        player.defensePoint++;
                        player.defense *= 0.9f;
                        player.pointRestants--;
                    }
                }
                if (butDext.isCliked)
                {
                    butDext.isCliked = false;
                    if (player.pointRestants > 0 && player.accuracy > 0)
                    {
                        player.dexteritePoint++;
                        player.accuracy--;
                        player.pointRestants--;
                    }
                }
                if (butPv.isCliked)
                {
                    butPv.isCliked = false;
                    if (player.pointRestants > 0)
                    {
                        player.pVMax = (int)(player.pVMax * 1.1f);
                        player.pV    = player.pVMax;
                        player.pointRestants--;
                    }
                }
                if (butVitesse.isCliked)
                {
                    butVitesse.isCliked = false;
                    if (player.pointRestants > 0)
                    {
                        player.vitessePoint++;
                        player.vitesseMaxInit += 0.5f;
                        player.vitesseMax      = player.vitesseMaxInit;
                        player.pointRestants--;
                    }
                }

                if (butInventaire.isCliked)
                {
                    butInventaire.isCliked = false;
                    inventaire             = new Inventaire(content, player);
                    state = SubGestion.inventaire;
                }

                if (player.newChar)
                {
                    if (saveName.IsFinish)
                    {
                        saveName.IsFinish = false;
                        player.name       = saveName.text;
                        player.newChar    = false;
                    }
                    else
                    {
                        saveName.Update(controles);
                    }
                }
                else
                {
                    saveName.SetText(player.name);
                }

                if (butLoad.isCliked)
                {
                    butLoad.isCliked = false;
                    state            = SubGestion.LoadChar;
                }
                break;

            case SubGestion.inventaire:
                inventaire.update(controles, mousseCoef, player, content);
                break;

            case SubGestion.LoadChar:
                butNewChar.Update(mousseCoef, controles);
                listviewperso.Update(mousseCoef, controles);
                Button item = listviewperso.GetClickedButton();
                if (item != null)
                {
                    player = new Player(new Vector2(0, 0), TexturesGame.PlayerTab[0], 0, player.graphics, LoadWeapons.LoadKnife(content), true, FlagsType.red);
                    XmlSerializer serializer2 = new XmlSerializer(typeof(SavPerso));
                    FileStream    fs2         = new FileStream((Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/TDZ/Sauvegardes/") + item.text[0], FileMode.Open);
                    XmlReader     reader2     = XmlReader.Create(fs2);
                    SavPerso      obj2        = (SavPerso)serializer2.Deserialize(reader2);
                    player.Deserialise(obj2, content);
                    fs2.Close();
                    state = SubGestion.fichePerso;
                }
                else if (butNewChar.isCliked)
                {
                    butNewChar.isCliked = false;
                    player = new Player(new Vector2(0, 0), TexturesGame.PlayerTab[0], 0, player.graphics, LoadWeapons.LoadKnife(content), true, FlagsType.red);
                    player.ItemList.Add(LoadWeapons.LoadKnife(content));
                    saveName = new TextView(graphics, font, player.name, true, true);
                    saveName.SetPositionAndColor(new Vector2(font.MeasureString(Langage.getString(Langage.langueactuelle, 7)).X + 500, 400), Color.Black);
                    state = SubGestion.fichePerso;
                }
                break;

            default:
                break;
            }
        }
Ejemplo n.º 9
0
        public void Hit(int dammage, ref List <Explosion> listExplose, List <ParticleEngine> particles, Sound sound, Map mapWorld, ContentManager Content, List <Vector2> explose)
        {
            if (hitable)
            {
                lifePoint -= dammage;
                if (lifePoint <= 0)
                {
                    bloque  = false;
                    draw    = false;
                    alive   = false;
                    hitable = false;

                    if (type == objectType.explosif)
                    {
                        listExplose.Add(new Explosion(position, map, particles, sound));
                    }
                    else if (type == objectType.caisse)
                    {
                        switch (contentIndex)
                        {
                        case 2:
                            mapWorld.Items.Add(new Item(new Texture2D[1] {
                                TexturesGame.bonusTab[0]
                            }, new Vector2(position.X, position.Y - 40), new Vector2(0, 0), true, Direction.right, new Vector2(30, 30), objectType.champi, 300));
                            break;

                        case 3:
                            mapWorld.Items.Add(new Item(new Texture2D[1] {
                                TexturesGame.bonusTab[1]
                            }, new Vector2(position.X, position.Y - 40), new Vector2(0, 0), true, Direction.stop, new Vector2(30, 30), objectType.vie, 300));
                            break;

                        case 4:
                            mapWorld.Items.Add(new Item(new Texture2D[1] {
                                TexturesGame.bonusTab[2]
                            }, new Vector2(position.X, position.Y - 40), new Vector2(0, 0), true, Direction.stop, new Vector2(30, 30), objectType.chargeur, 300));
                            break;

                        case 5:

                            Vehicule Hornet = new Vehicule(vehiculeType.Hornet, new Vector2(position.X, position.Y - 150), 2, 20, new Vector2(3, 3), Direction.stop, true, new Vector2(182, 120), TexturesGame.itemTab[0], 0);
                            Hornet.name = "Hornet";
                            Hornet.VehicleGun.Add(new Weapon(4000, "Others/Munitions/bullet", "AK47", 110, 0.1f, cadenceType.auto, 2500, 150, 150, 15, 120, Vector2.Zero, Vector2.Zero, "hornet_right", true, 0, Content, SoundsName.fusil, tirTypes.bullet, false, 2, 0));
                            Hornet.VehicleGun[0].weaponName = "Hornet Gun";
                            Hornet.VehicleGun.Add(new Weapon(4000, "Others/Munitions/rpgammo22", "AK47", 300, 0.05f, cadenceType.semiAuto, 500, 6, 6, 8, 200, Vector2.Zero, Vector2.Zero, "hornet_right", true, 0, Content, SoundsName.rocket, tirTypes.explosive, false, 2, 0));
                            Hornet.VehicleGun[1].weaponName = "Hornet Rocket";
                            mapWorld.itemList.Add(Hornet);
                            break;

                        case 6:
                            Vehicule Banshee = new Vehicule(vehiculeType.Banshee, new Vector2(position.X, position.Y - 150), 1, 20, new Vector2(3, 2), Direction.stop, true, new Vector2(147, 117), TexturesGame.itemTab[1], 0);
                            Banshee.name = "Banshee";
                            Banshee.VehicleGun.Add(LoadWeapons.LoadBansheeBomb(Content));
                            Banshee.VehicleGun.Add(LoadWeapons.LoadBansheeGun(Content));
                            mapWorld.itemList.Add(Banshee);
                            break;

                        case 7:
                            listExplose.Add(new Explosion(position, map, particles, sound));

                            break;

                        case 8:
                            mapWorld.Items.Add(new Item(new Texture2D[1] {
                                TexturesGame.bonusTab[3]
                            }, new Vector2(position.X, position.Y - 40), new Vector2(0, 0), true, Direction.right, new Vector2(30, 30), objectType.etoile, 300));
                            break;

                        case 9:
                            mapWorld.Items.Add(new Item(new Texture2D[1] {
                                TexturesGame.bonusTab[4]
                            }, new Vector2(position.X, position.Y - 40), new Vector2(0, 0), true, Direction.right, new Vector2(30, 30), objectType.UnlimitedAmmo, 300));
                            break;

                        case 10:
                            mapWorld.Items.Add(new Item(new Texture2D[1] {
                                TexturesGame.bonusTab[5]
                            }, new Vector2(position.X, position.Y - 40), new Vector2(0, 0), true, Direction.right, new Vector2(30, 30), objectType.attaqueUp, 300));
                            break;

                        case 11:
                            mapWorld.Items.Add(new Item(new Texture2D[1] {
                                TexturesGame.bonusTab[6]
                            }, new Vector2(position.X, position.Y - 40), new Vector2(0, 0), true, Direction.right, new Vector2(30, 30), objectType.defenseUp, 300));
                            break;

                        default:
                            break;
                        }
                    }
                    else
                    {
                        mapWorld.particleEngine.Add(new ParticleEngine(7, position + new Vector2(38, 38), new Vector2(0, 1), 5, TexturesGame.test[1], 60, 38, 0, 38, 0, 0.5f, false));
                        this.type = objectType.nothing;
                    }
                }
            }
        }
Ejemplo n.º 10
0
        public void GetPacket(List <Player> players, int hostPlayer, Map map, Shot shots, ContentManager Content, GraphicsDevice graphics, List <Explosion> explosionList, List <ParticleEngine> particles, Sound sound, List <Vector2> explosions, List <Entity> entityList)
        {
            NetIncomingMessage incMsg;

            incMsg = client.ReadMessage();
            if (incMsg != null)
            {
                switch (incMsg.MessageType)
                {
                case NetIncomingMessageType.Data:
                    int count;
                    //Nplayers
                    int nbPlayers = incMsg.ReadInt32();

                    if (nbPlayers > players.Count)
                    {
                        Player player;
                        if (nbPlayers % 2 == 0)
                        {
                            player = new Player(map.spawnPoint2, TexturesGame.PlayerTab[0], players.Count, graphics, LoadWeapons.LoadKnife(Content), true, FlagsType.red);
                        }
                        else
                        {
                            player = new Player(map.spawnPoint, TexturesGame.PlayerTab[1], players.Count, graphics, LoadWeapons.LoadKnife(Content), true, FlagsType.blue);
                        }
                        players.Add(player);
                        entityList.Add(player);
                    }

                    for (int i = 0; i < nbPlayers; i++)
                    {
                        //Perso
                        if (i != hostPlayer)
                        {
                            players[i].position.X   = incMsg.ReadInt32();
                            players[i].position.Y   = incMsg.ReadInt32();
                            players[i].activeSprite = (AnimDir)incMsg.ReadInt32();
                            players[i].direction    = (Direction)incMsg.ReadInt32();

                            players[i].currentWeapon.numArme    = incMsg.ReadInt32();
                            players[i].currentWeapon.position.X = incMsg.ReadInt32();
                            players[i].currentWeapon.position.Y = incMsg.ReadInt32();
                            players[i].currentWeapon.angle      = incMsg.ReadDouble();
                            players[i].currentWeapon.numBalle   = incMsg.ReadInt32();

                            players[i].arm.position.X = incMsg.ReadInt32();
                            players[i].arm.position.Y = incMsg.ReadInt32();
                            players[i].arm.rectangle  = new Rectangle((int)players[i].arm.position.X, (int)players[i].arm.position.Y, incMsg.ReadInt32(), incMsg.ReadInt32());
                            players[i].arm.angle      = incMsg.ReadDouble();

                            //Map
                            count = incMsg.ReadInt32();
                            for (int j = 0; j < count; j++)
                            {
                                int x   = incMsg.ReadInt32();
                                int y   = incMsg.ReadInt32();
                                int hit = incMsg.ReadInt32();
                                map.world[y, x].Hit(hit, ref explosionList, particles, sound, map, Content, explosions);
                            }

                            //Tirs Others Pos
                            count = incMsg.ReadInt32();
                            for (int j = 0; j < count; j++)
                            {
                                Vector2 position = new Vector2((float)incMsg.ReadInt32(), (float)incMsg.ReadInt32());
                                double  angle    = incMsg.ReadDouble();
                                int     damage   = incMsg.ReadInt32();
                                shots.otherTirList.Add(new Tirs(TexturesGame.ammoTab[players[i].currentWeapon.numBalle], damage, position, Vector2.Zero, 0, i, angle, 0, tirTypes.bullet));    // TODO: Implémenter tirTypes !!!
                            }
                        }
                        else
                        {
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadDouble();
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadInt32();
                            incMsg.ReadDouble();
                            count = incMsg.ReadInt32();
                            for (int j = 0; j < count; j++)
                            {
                                incMsg.ReadInt32();
                                incMsg.ReadInt32();
                                incMsg.ReadInt32();
                            }
                            count = incMsg.ReadInt32();
                            for (int j = 0; j < count; j++)
                            {
                                incMsg.ReadInt32();
                                incMsg.ReadInt32();
                                incMsg.ReadDouble();
                                incMsg.ReadInt32();
                            }
                        }
                    }

                    //Scores
                    redScore  = incMsg.ReadInt32();
                    blueScore = incMsg.ReadInt32();

                    //Platforms
                    count = incMsg.ReadInt32();
                    for (int i = 0; i < count; i++)
                    {
                        map.platFormList[i].position = new Vector2((float)incMsg.ReadInt32(), (float)incMsg.ReadInt32());
                        map.platFormList[i].speed    = new Vector2((float)incMsg.ReadInt32(), (float)incMsg.ReadInt32());
                        map.platFormList[i].oldspeed = new Vector2((float)incMsg.ReadInt32(), (float)incMsg.ReadInt32());
                    }
                    break;

                default:
                    break;
                }
            }
        }