Пример #1
0
    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;
        }
    }
Пример #2
0
 void OnAdComplete(AdResultData resultData)
 {
     if (resultData.placement == AdPlacement.Custom)
     {
         var isSuccess = resultData.result == AdResult.Finished;
         customAction.Dispatch(isSuccess);
         Clean();
         Release();
     }
 }
Пример #3
0
        protected override void OnClick()
        {
            var result = new AdResultData(View.Placement, View.Result, EditorFullscreenAdsService.EDITOR_PROVIDER_ID);

            onAdComplete.Dispatch(result);
        }
Пример #4
0
 void OnAdComplete(AdResultData data)
 {
     View.Hide();
 }
Пример #5
0
 void AdCompleted(AdResultData adResultData)
 {
     Debug.LogFormat("[Ads] Ad complete: {0} from: {1}.", adResultData.placement, adResultData.provider);
     OnAdComplete.Dispatch(adResultData);
 }