Beispiel #1
0
    private void on_click()
    {
        if (client != null)
        {
            return;
        }

        var name = Username.text;
        var pw   = Password.text;

        if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(pw))
        {
            Status.Error("Username and password required."); //TRANSLATE
            return;
        }

        Debug.Log("PW: " + pw);

        btn.interactable             = false;
        client                       = new LoginClientLL();
        client.OnDisconnected       += on_disconnected;
        client.OnServerDisconnected += on_server_disconnected;
        client.OnLoginResult        += on_login_result;
        client.DoLogin(name, pw);
    }