Esempio n. 1
0
 public static void ServerHandlePlayerJoined(int id, Stream s)
 {
     if (id >= desiredPlayerCount)
     {
         Log("Client tried to connect, but server is full" + id);
         PirateRPC.PirateRPC.SendInvocation(s, u => { NetDemo.ForcePlayerDisconnect("Connection refused : server full"); });
     }
     else
     {
         Log("sending client id " + id);
         int roundLen = ServerGetRoundLength();
         Log("sending round len " + roundLen);
         PirateRPC.PirateRPC.SendInvocation(s, GetCallbackForSuccessfulPlayerJoin(id, roundLen));
     }
 }