public void CalculateExchangeAllForCoins(IBaseNetworkErrorHandler errorHandler)
    {
        APICall <CalculateExchangeForCoinsOperation> aPICall = clubPenguinClient.RewardApi.CalculateExchangeAllForCoins();

        aPICall.OnResponse += onCalculateExchangeAllForCoins;
        aPICall.OnError    += delegate(CalculateExchangeForCoinsOperation o, HttpResponse response)
        {
            NetworkErrorService.OnError(response, errorHandler);
        };
        aPICall.Execute();
    }
    public void GetLocalPlayerData(IBaseNetworkErrorHandler errorHandler)
    {
        APICall <GetLocalPlayerDataOperation> localPlayerData = clubPenguinClient.PlayerApi.GetLocalPlayerData();

        localPlayerData.OnResponse += localPlayerDataReturned;
        localPlayerData.OnError    += delegate(GetLocalPlayerDataOperation o, HttpResponse response)
        {
            Service.Get <EventDispatcher>().DispatchEvent(default(PlayerStateServiceErrors.PlayerProfileError));
            NetworkErrorService.OnError(response, errorHandler);
        };
        localPlayerData.Execute();
    }
示例#3
0
 private void onPostRoomPlayersError(PostRoomPlayersOperation operation, HttpResponse response)
 {
     Log.LogNetworkErrorFormatted(this, "onPostRoomPlayersError, status: {0}, body: {1}", response.StatusCode, response.Text);
     NetworkErrorService.OnError(response, errorHandler, onPostRoomPlayersErrorMapper);
 }
示例#4
0
 private void onFishingCastError(FishingCastOperation operation, HttpResponse response)
 {
     NetworkErrorService.OnError(response, errorHandler, onFishingCastErrorMapper);
 }
示例#5
0
 protected void handleCPResponseError(HttpResponse httpResponse)
 {
     NetworkErrorService.dispatchErrorEvent(httpResponse);
 }
 private void onRoomsFoundToJoinError(GetRoomsOperation operation, HttpResponse response)
 {
     NetworkErrorService.OnError(response, errorHandler);
 }