Esempio n. 1
0
    internal IEnumerator LoginByAccount(string user, string pass, Action <bool> isLoginComplete)
    {
        _txtState.text = "Verifying account...";
        yield return(new WaitForSeconds(1));

        string deviceID = SystemInfo.deviceUniqueIdentifier;

        yield return(StartCoroutine(ServerAdapter.SwitchAccount(user, pass, deviceID, result =>
        {
            if (result.StartsWith("Error"))
            {
                isHaveError = true;
                dataError = result;
                ShowPopupError(5);
                isLoginComplete(false);
            }
            else
            {
                isLoginComplete(true);
                ReadDataAccount(result);
            }
        })));
    }