Esempio n. 1
0
    public void Login()
    {
        var username = usernameLabel.text;
        var password = passwordLabel.text;

        var request = new LoginRequest();

        request.username      = username;
        request.password      = password;
        request.clientVersion = 0;
        request.dataVersion   = 0;
        request.marketType    = 0;

        var serviceClient = new SJServiceClient <LoginRequest, LoginResponse>();

        serviceClient.Post(LoginRequest.uri, request,
                           (response) =>
        {
            Debug.Log("정상적으로 로그인 되었습니다");

            //gemCountLabel.text = response.accountVo.gem.ToString();
            ServiceAuthentication.SetAuthInfo(new RequestBase.AuthInfo()
            {
                username  = request.username,
                authToken = response.authToken
            });
            StartClient();
        },
                           Error);
    }
Esempio n. 2
0
    public void OnCreateClicked()
    {
        var username = usernameLabel.text;
        var password = passwordLabel.text;
        var confirm  = confirmLabel.text;

        var request = new AccountCreateRequest();

        request.username = username;
        request.password = password;
        request.confirm  = confirm;

        var serviceClient = new SJServiceClient <AccountCreateRequest, AccountCreateResponse>();

        serviceClient.Post(AccountCreateRequest.uri, request,
                           (response)
                           =>
        {
            MainUI.s_Instance.ShowInfoPopup("계정 생성 완료.");
            MainUI.s_Instance.ShowLoginPanel();
        },
                           Error);
    }