public LightShootPlayer(Shoot shoot, int index)
 {
     time = shoot.time;
     playerIndex = index;
 }
 internal void AddShoot(LightShootPlayer lightShootPlayer)
 {
     Player p = GameEnvironment.Instance.Players.ElementAt(lightShootPlayer.playerIndex);
     Shoot shoot = new Shoot(p.getCharacter(), lightShootPlayer.time);
     commands.Enqueue(shoot);
 }
 public LightShoot(Shoot shoot)
 {
     time = shoot.time;
 }
 internal void AddShoot(Player player, LightShoot lightShoot)
 {
     Shoot shoot = new Shoot(player.getCharacter(), lightShoot.time);
     commands.Enqueue(shoot);
     int index = 0;//GameEnvironment.Instance.Players.Count-1;
     foreach ( Player p in GameEnvironment.Instance.Players )
     {
         if ( p==player )
         {
             break;
         }
         index++;
     }
     index--; // On server, player max = server | On client, player max = client, player max-1 = server
         // TODO : change this ! (cf GameEnvironment)
     Console.WriteLine(index);
     LightShootPlayer lsp = new LightShootPlayer(shoot, index);
     foreach (Player p in GameEnvironment.Instance.Players)
     {
         if (p != GameEnvironment.Instance.LocalPlayer && p != player)
         {
             communication.SendReliable(lsp, NetFrame.FrameType.shootCommandPlayer, p);
         }
     }
 }