private void HandleShowResult(string result) { switch (result) { case "0": Debug.Log("The ad was successfully shown."); // // YOUR CODE TO REWARD THE GAMER // Give coins etc. if (BlackCat2Huuuge != null) { AdResultData sData = new AdResultData(_placement, AdResult.Finished, _provider); BlackCat2Huuuge(sData); } BlackCat2Huuuge = null; break; case "1": Debug.LogError("The ad failed to be shown."); if (BlackCat2Huuuge != null) { AdResultData fData = new AdResultData(_placement, AdResult.Failed, _provider); BlackCat2Huuuge(fData); } BlackCat2Huuuge = null; break; } }
void OnAdComplete(AdResultData resultData) { if (resultData.placement == AdPlacement.Custom) { var isSuccess = resultData.result == AdResult.Finished; customAction.Dispatch(isSuccess); Clean(); Release(); } }
protected override void OnClick() { var result = new AdResultData(View.Placement, View.Result, EditorFullscreenAdsService.EDITOR_PROVIDER_ID); onAdComplete.Dispatch(result); }
void OnAdComplete(AdResultData data) { View.Hide(); }
void AdCompleted(AdResultData adResultData) { Debug.LogFormat("[Ads] Ad complete: {0} from: {1}.", adResultData.placement, adResultData.provider); OnAdComplete.Dispatch(adResultData); }