public SupersonicError getErrorFromErrorString(string description) { SupersonicError sse; if (!String.IsNullOrEmpty(description)) { Dictionary <string, object> error = SupersonicJSON.Json.Deserialize(description) as Dictionary <string, object>; // if there is a supersonic error if (error != null) { int eCode = Convert.ToInt32(error[ERROR_CODE].ToString()); string eDescription = error[ERROR_DESCRIPTION].ToString(); sse = new SupersonicError(eCode, eDescription); } // else create an empty one else { sse = new SupersonicError(-1, ""); } } else { sse = new SupersonicError(-1, ""); } return(sse); }
public void onGetOfferwallCreditsFail(string description) { if (_onGetOfferwallCreditsFailEvent != null) { SupersonicError sse = getErrorFromErrorString(description); _onGetOfferwallCreditsFailEvent(sse); } }
public void onInterstitialShowFail(string description) { if (_onInterstitialShowFailEvent != null) { SupersonicError sse = getErrorFromErrorString(description); _onInterstitialShowFailEvent(sse); } }
public void onRewardedVideoShowFail(string description) { if (_onRewardedVideoShowFailEvent != null) { SupersonicError error = this.getErrorFromErrorString(description); _onRewardedVideoShowFailEvent(error); } }
public void onOfferwallInitFail(string description) { if (_onOfferwallInitFailEvent != null) { SupersonicError error = this.getErrorFromErrorString(description); _onOfferwallInitFailEvent(error); } }
public void onInterstitialShowFailed(string description) { if (_onInterstitialShowFailedEvent != null) { SupersonicError error = this.getErrorFromErrorString(description); _onInterstitialShowFailedEvent(error); } }
public void onRewardedVideoInitFail(string description) { if (_onRewardedVideoInitFailEvent != null) { SupersonicError sse = getErrorFromErrorString(description); _onRewardedVideoInitFailEvent(sse); } }
void SupersonicEvents_onRewardedVideoInitFailEvent(SupersonicError obj) { }
//Invoked when RewardedVideo initialization process has failed. //SupersonicError contains the reason for the failure. public void RewardedVideoInitFailEvent(SupersonicError error) { Debug.Log("Init rewarded video error "); //PF_Advertising.ReportAdActivity(new ReportAdActivityRequest(){ PlacementId = SupersonicEvents.queuedAd.PlacementId, RewardId = SupersonicEvents.queuedAd.RewardId, Activity = AdAc }, null, PF_Bridge.PlayFabErrorCallback); }