예제 #1
0
 public void Connect(string address = "127.0.0.1", int port = 7777, int retries = 10, int timeout = 15)
 {
     if (client_peer == null)
     {
         Timeout           = timeout;
         disconnect_reason = string.Empty;
         client_peer       = RakNet_Peer.Connect(address, port, retries, timeout);
         IsConnecting      = true;
         OnConnecting(address, port);
         OnConnectingEvent?.Invoke(address, port);
     }
     else
     {
         Debug.LogWarning("[Client] Is already running...");
     }
 }