コード例 #1
0
    public void MigrateLegacy(CPIDCredentials cpidCreds)
    {
        APICall <MigrateLegacyAccountOperation> aPICall = clubPenguinClient.PlayerApi.MigrateLegacyAccount(cpidCreds);

        aPICall.OnResponse += migrationSuccessful;
        aPICall.OnError    += handleCPResponseError;
        aPICall.OnError    += migrationError;
        aPICall.Execute();
    }
コード例 #2
0
    public void Login(DLoginPayload payload)
    {
        CPIDCredentials cpidCreds = default(CPIDCredentials);

        cpidCreds.username = payload.Username;
        cpidCreds.password = payload.Password;
        Service.Get <EventDispatcher>().AddListener <PlayerStateServiceEvents.MigrationDataRecieved>(onLoginSuccess);
        Service.Get <EventDispatcher>().AddListener <PlayerStateServiceErrors.LegacyAccountMigrationError>(onLoginFailed);
        if (networkServiceManager != null)
        {
            if (networkServiceManager.PlayerStateService != null)
            {
                networkServiceManager.PlayerStateService.MigrateLegacy(cpidCreds);
            }
            else
            {
                Log.LogError(this, "networkServiceManager.PlayerStateService not initialized for classic migration login");
            }
        }
        else
        {
            Log.LogError(this, "NetworkServiceManager not initialized for classic migration login");
        }
    }
コード例 #3
0
    public APICall <MigrateLegacyAccountOperation> MigrateLegacyAccount(CPIDCredentials cpidCreds)
    {
        MigrateLegacyAccountOperation operation = new MigrateLegacyAccountOperation(cpidCreds);

        return(new APICall <MigrateLegacyAccountOperation>(clubPenguinClient, operation));
    }
コード例 #4
0
 public MigrateLegacyAccountOperation(CPIDCredentials cpidCreds)
 {
     RequestBody = cpidCreds;
 }