Exemplo n.º 1
0
        public void onVideoStarted()
        {
            if (OnVideoStarted != null)
            {
                OnVideoStarted();
            }

            UnityAdsExternal.Log("onVideoStarted");
        }
Exemplo n.º 2
0
        public void onFetchFailed()
        {
            _campaignsAvailable = false;
            if (OnCampaignsFetchFailed != null)
            {
                OnCampaignsFetchFailed();
            }

            UnityAdsExternal.Log("onFetchFailed");
        }
Exemplo n.º 3
0
        public void onFetchCompleted()
        {
            _campaignsAvailable = true;
            if (OnCampaignsAvailable != null)
            {
                OnCampaignsAvailable();
            }

            UnityAdsExternal.Log("onFetchCompleted");
        }
Exemplo n.º 4
0
        /* Events */

        public void onHide()
        {
            _adsShow = false;
            if (OnHide != null)
            {
                OnHide();
            }

            UnityAdsExternal.Log("onHide");
        }
Exemplo n.º 5
0
        public void onVideoCompleted(string parameters)
        {
            if (parameters != null)
            {
                List <string> splittedParameters = new List <string>(parameters.Split(';'));
                string        rewardItemKey      = splittedParameters.ToArray().GetValue(0).ToString();
                bool          skipped            = splittedParameters.ToArray().GetValue(1).ToString() == "true" ? true : false;

                if (OnVideoCompleted != null)
                {
                    OnVideoCompleted(rewardItemKey, skipped);
                }

                UnityAdsExternal.Log("onVideoCompleted: " + rewardItemKey + " - " + skipped);
            }
        }
Exemplo n.º 6
0
        public static Dictionary <string, string> getRewardItemDetailsWithKey(string rewardItemKey)
        {
            Dictionary <string, string> retDict = new Dictionary <string, string>();
            string rewardItemDataString         = "";

            if (_campaignsAvailable)
            {
                rewardItemDataString = UnityAdsExternal.getRewardItemDetailsWithKey(rewardItemKey);

                if (rewardItemDataString != null)
                {
                    List <string> splittedData = new List <string>(rewardItemDataString.Split(';'));
                    UnityAdsExternal.Log("UnityAndroid: getRewardItemDetailsWithKey() rewardItemDataString=" + rewardItemDataString);

                    if (splittedData.Count == 2)
                    {
                        retDict.Add(getRewardItemNameKey(), splittedData.ToArray().GetValue(0).ToString());
                        retDict.Add(getRewardItemPictureKey(), splittedData.ToArray().GetValue(1).ToString());
                    }
                }
            }

            return(retDict);
        }
Exemplo n.º 7
0
 public void onShow()
 {
     UnityAdsExternal.Log("onShow");
 }