private void DoAuthWindow(int windowId)
    {
        GUILayout.BeginVertical();

        GUILayout.Label(
            string.Format(
                "The account your trying to log in to, {0}, doesn't exist. Do you wish to create the account?",
                UtilValues.getAccountLogin(m_exampleAccountType)));

        GUILayout.BeginHorizontal();


        if (Util.Button("Yes"))
        {
            switch (m_exampleAccountType)
            {
            case ExampleAccountType.Universal_1:
            {
                WrapperAuthenticateDialog.AuthenticateAsUniversal_1(true);

                break;
            }

            case ExampleAccountType.Universal_2:
            {
                WrapperAuthenticateDialog.AuthenticateAsUniversal_2(true);

                break;
            }

            case ExampleAccountType.Email:
            {
                WrapperAuthenticateDialog.AuthenticateAsEmail(true);

                break;
            }

            default:
            {
                throw new Exception();
            }
            }

            Destroy(gameObject);
            return;
        }

        if (Util.Button("No"))
        {
            Destroy(gameObject);
        }

        GUILayout.EndHorizontal();

        GUILayout.EndVertical();
    }
Ejemplo n.º 2
0
    public static void AttachIdentityEmail()
    {
        GameObject           dialogObject = new GameObject("Dialog");
        AttachIdentityDialog dialog       = dialogObject.AddComponent <AttachIdentityDialog>();

        dialog.m_exampleAccountType = ExampleAccountType.Email;

        App.Bc.Client
        .IdentityService.AttachEmailIdentity(UtilValues.getEmail(), UtilValues.getPassword(),
                                             dialog.OnSuccess_AttachIndentity, dialog.OnError_AttachIdentity);
    }
Ejemplo n.º 3
0
    public static void AuthenticateAsEmail(bool forceCreate = false)
    {
        GameObject         dialogObject = new GameObject("Dialog");
        AuthenticateDialog dialog       = dialogObject.AddComponent <AuthenticateDialog>();

        dialog.m_exampleAccountType = ExampleAccountType.Email;

        App.Bc.Client.AuthenticationService
        .AuthenticateEmailPassword(UtilValues.getEmail(), UtilValues.getPassword(), forceCreate,
                                   dialog.OnSuccess_Authenticate, dialog.OnError_Authenticate);
    }
    public static void DetachIdentityEmail(bool contiuneAsAnonymous = false)
    {
        GameObject           dialogObject = new GameObject("Dialog");
        DetachIdentityDialog dialog       = dialogObject.AddComponent <DetachIdentityDialog>();

        dialog.m_exampleAccountType = ExampleAccountType.Email;

        App.Bc.Client
        .IdentityService.DetachEmailIdentity(UtilValues.getEmail(), contiuneAsAnonymous,
                                             dialog.OnSuccess_DetachIdentity, dialog.OnError_DetachIdentity);
    }
Ejemplo n.º 5
0
    public static void AuthenticateAsUniversal_2(bool forceCreate = false)
    {
        GameObject dialogObject          = new GameObject("Dialog");
        WrapperAuthenticateDialog dialog = dialogObject.AddComponent <WrapperAuthenticateDialog>();

        dialog.m_exampleAccountType = ExampleAccountType.Universal_2;

        App.Bc
        .AuthenticateUniversal(UtilValues.getUniversal_2(), UtilValues.getPassword(), forceCreate,
                               dialog.OnSuccess_Authenticate, dialog.OnError_Authenticate);
    }
Ejemplo n.º 6
0
    public static void MergeIdentityUniversal_2()
    {
        GameObject          dialogObject = new GameObject("Dialog");
        MergeIdentityDialog dialog       = dialogObject.AddComponent <MergeIdentityDialog>();

        dialog.m_exampleAccountType = ExampleAccountType.Universal_2;

        App.Bc.Client
        .IdentityService.MergeUniversalIdentity(UtilValues.getUniversal_2(), UtilValues.getPassword(),
                                                dialog.OnSuccess_MergeIdentity, dialog.OnError_MergeIdentity);
    }