Exemplo n.º 1
0
 /// <summary>
 /// Join room with given title. If no such room exists the room will be created.
 /// </summary>
 /// <param name="roomName">Unique name of the room to create.</param>
 public static void JoinRoom(string roomName)
 {
     if (room != null)
     {
         Debug.LogError("JoinRoom aborted: You are already in a room!");
     }
     else if (roomName == string.Empty)
     {
         Debug.LogError("JoinRoom aborted: You must specifiy a room name!");
     }
     else
     {
         if (offlineMode)
         {
             offlineMode_inRoom = true;
             NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnJoinedRoom);
         }
         else
         {
             networkingPeer.OpJoin(roomName);
         }
     }
 }