示例#1
0
    private void AdManager_OnAdDone(object sender, OnAdDoneEventArgs e)
    {
        if (e.PlacementID == MyAdManager.SampleRewarded)
        {
            switch (e.AdShowResult)
            {
            case ShowResult.Failed:
                Debug.Log("Ad failed play");
                //showErrorText("Ad failed play");
                break;

            case ShowResult.Skipped:
                Debug.Log("Ad was skipped");
                //showErrorText("Ad was skipped");
                break;

            case ShowResult.Finished:
                //add points here
                Debug.Log("Ad finished");
                player.addReward();
                showErrorText("Ad finished");
                break;
            }
        }
    }