예제 #1
0
 private IEnumerator <IYieldInstruction> UpdateGameServerConnectionsContinuously()
 {
     while (true)
     {
         var peersCount = peerContainer.GetPeersCount();
         if (connections != peersCount)
         {
             connections = peersCount;
             UpdateGameServerConnections();
         }
         yield return(new WaitForSeconds(CONNECTIONS_UPDATE_TIME));
     }
 }
예제 #2
0
 public GameServerProviderService()
 {
     peerContainer = ServerComponents.GetComponent <IPeerContainer>().AssertNotNull();
     connections   = peerContainer.GetPeersCount();
 }