コード例 #1
0
    private void TriggerGameOver()
    {
        //Trigger an ad.
        RequestInterstitialAd interAd = GetComponent <RequestInterstitialAd>();

        m_interAd = interAd.m_ad;//This returns the Ad

        if (!interAd.m_ad.IsLoaded())
        {
            //Not loaded. Request.
            m_interAd = interAd.RequestInterstitial();
        }

        m_interAd.Show();
        m_scoreTracker.HideScore();

        //Clean up.
        m_interAd.OnAdClosed += (o, e) =>
        {
            ActivateUI();//Game Over UI.
        };
    }