Пример #1
0
 private static void OnJoinedLobby(Optimization.AOTEventArgs args)
 {
     if (NeedRejoin)
     {
         TryRejoinRoom();
         NeedRejoin = false;
     }
     RejoinRegion = PhotonNetwork.networkingPeer.MasterServerAddress.Split(':')[0];
 }
Пример #2
0
        private static void OnConnectionFail(Optimization.AOTEventArgs args)
        {
            UnityEngine.Debug.Log("OnConnectionFail: " + args.DisconnectCause.ToString());
            switch (args.DisconnectCause)
            {
            case DisconnectCause.DisconnectByServerLogic:
            case DisconnectCause.DisconnectByClientTimeout:
            case DisconnectCause.DisconnectByServerTimeout:
            case DisconnectCause.InternalReceiveException:
            case DisconnectCause.Exception:
                NeedRejoin = true;
                break;

            default:
                NeedRejoin = false;
                break;
            }
        }
Пример #3
0
 private static void OnJoinedRoom(Optimization.AOTEventArgs args)
 {
     //RejoinRoom = PhotonNetwork.room;
 }
Пример #4
0
 private void OnLeftRoom(Optimization.AOTEventArgs args)
 {
     DisableImmediate();
 }