Esempio n. 1
0
 private void CheckReconnectTimeout()
 {
     if (this.IsReconnecting())
     {
         float realtimeSinceStartup = UnityEngine.Time.realtimeSinceStartup;
         float num2    = realtimeSinceStartup - this.m_reconnectStartTimestamp;
         float timeout = this.GetTimeout();
         if (num2 >= timeout)
         {
             this.OnReconnectTimeout();
         }
         else
         {
             ClientConnection <PegasusPacket> gameServerConnection = ConnectAPI.GetGameServerConnection();
             if (!gameServerConnection.Active && !gameServerConnection.HasEvents())
             {
                 float num4      = realtimeSinceStartup - this.m_retryStartTimestamp;
                 float retryTime = this.GetRetryTime();
                 if (num4 >= retryTime)
                 {
                     this.m_retryStartTimestamp = realtimeSinceStartup;
                     this.StartGame();
                 }
             }
         }
     }
 }