コード例 #1
0
        public void CloseAd()
        {
            AdFinished adFinished = new AdFinished();

            adFinished.network = provider;
            adFinished.type    = adType;
            adFinished.reason  = "close";

            if (adType.ToLower().Trim().Equals("rewardvideo"))
            {
                adFinished.reward = new AdReward();

                if (Spil.CurrencyName != null)
                {
                    adFinished.reward.currencyName = Spil.CurrencyName;
                }

                if (Spil.CurrencyId != null)
                {
                    adFinished.reward.currencyId = Spil.CurrencyId;
                }

                if (Spil.Reward != 0)
                {
                    adFinished.reward.reward = Spil.Reward;
                }
            }

            SpilUnityImplementationBase.fireAdFinishedEvent(JsonHelper.getJSONFromObject(adFinished));
            provider = null;
            adType   = null;
            Destroy(AdOverlay);
        }
コード例 #2
0
        public void DismissAd()
        {
            AdFinished adFinished = new AdFinished();

            adFinished.network = provider;
            adFinished.type    = adType;
            adFinished.reason  = "dismiss";

            SpilUnityImplementationBase.fireAdFinishedEvent(JsonHelper.getJSONFromObject(adFinished));
            provider = null;
            adType   = null;
            Destroy(AdOverlay);
        }
コード例 #3
0
 /// <summary>
 /// This method is called by the native Spil SDK, it should not be used by developers.
 /// Developers can subscribe to the Spil.Instance.AdFinished event.
 /// </summary>
 public void AdFinished(string response)
 {
     SpilUnityImplementationBase.fireAdFinishedEvent(response);
 }