示例#1
0
 /// <summary>
 /// Start the connection process.
 /// - If already connected, we attempt joining a random room
 /// - if not yet connected, Connect this application instance to Photon Cloud Network
 /// </summary>
 public void Connect()
 {
     // we check if we are connected or not, we join if we are , else we initiate the connection to the server.
     if (MasterNetAdapter.PUN_Connected)
     {
         MasterNetAdapter.PUN_JoinRandomRoom();
     }
     else
     {
         MasterNetAdapter.PUN_ConnectUsingSettings(_gameVersion);
     }
 }
示例#2
0
 public void OnConnect(ServerClient svrclnt)
 {
     MasterNetAdapter.PUN_JoinRandomRoom();
 }