Пример #1
0
 private void initServer()
 {
     if (localhost)
     {
         client = new Colyseus.Client("ws://localhost:6017");
     }
     else
     {
         Debug.Log("Conectando a drokt.com");
         client = new Colyseus.Client("ws://" + serverIP + ":6017");
     }
     JoinOrCreateRoom();
 }
Пример #2
0
    public void connect()
    {
        if (localhost)
        {
            client = new Colyseus.Client("ws://localhost:6017");
        }
        else
        {
            client = new Colyseus.Client("ws://" + Client.serverIP + ":6017");
        }

        Debug.Log("Connected");
        join();
    }
    async void ConnectToServer()
    {
        /*
         * Get Colyseus endpoint from InputField
         */
        string endpoint = m_EndpointField.text;

        Debug.Log("Connecting to " + endpoint);

        /*
         * Connect into Colyeus Server
         */
        client = ColyseusManager.Instance.CreateClient(endpoint);

        //await client.Auth.Login();

        //var friends = await client.Auth.GetFriends();

        //// Update username
        //client.Auth.Username = "******";
        //await client.Auth.Save();
    }
Пример #4
0
 /*
  * Sets the endpoint to the Colyseus server.
  */
 public async void ConnectToServer()
 {
     Debug.Log("Connecting to " + endpoint);
     client = ColyseusManager.Instance.CreateClient(endpoint);
 }