Ejemplo n.º 1
0
 private void PlayfabEvents_OnGlobalErrorEvent(PlayFabRequestCommon request, PlayFabError error)
 {
     if (error.Error == PlayFabErrorCode.InvalidSessionTicket)
     {
         this.forceRelogin = true;
     }
 }
Ejemplo n.º 2
0
 private void OnGlobalPlayFabResultHandler(PlayFabRequestCommon request, PlayFabResultCommon result)
 {
     if (result is LoginResult loginResult)
     {
         var payload = loginResult.InfoResultPayload;
         this.UpdateVirtualCurrencies(payload?.UserVirtualCurrency, payload?.UserVirtualCurrencyRechargeTimes);
     }
     else if (result is GetUserInventoryResult getUserInventoryResult)
     {
         this.UpdateVirtualCurrencies(getUserInventoryResult?.VirtualCurrency, getUserInventoryResult?.VirtualCurrencyRechargeTimes);
     }
     else if (result is GetPlayerCombinedInfoResult getPlayerCombinedInfoResult)
     {
         var payload = getPlayerCombinedInfoResult.InfoResultPayload;
         this.UpdateVirtualCurrencies(payload?.UserVirtualCurrency, payload?.UserVirtualCurrencyRechargeTimes);
     }
 }
Ejemplo n.º 3
0
 private static void SharedError_Global(PlayFabRequestCommon request, PlayFabError error)
 {
     Callbacks.Add("SharedError_Global");
     throw new Exception("Non-PlayFab callback error");
 }
Ejemplo n.º 4
0
 private void OnProcessingErrorEvent(PlayFabRequestCommon request, PlayFabError error)
 {
     //This just forwards the event.
     if (_instance.OnGlobalErrorEvent != null)
     {
         _instance.OnGlobalErrorEvent(request, error);
     }
 }