Esempio n. 1
0
        public void ShowAd(string name, bool load)
        {
            if (string.IsNullOrEmpty(name))
            {
                return;
            }

            UnBindCurrentHandler();

            m_AdName = name;

            m_AdHandler = AdsMgr.S.GetNativeAdHandler(m_AdName);
            BindCurrentHandler();

            if (m_AdHandler == null)
            {
                Log.w("Not Find AdHandler:" + m_AdName);
                return;
            }

            UpdateUIAsAdState();

            if (load)
            {
                m_AdHandler.LoadAd();
            }

            if (m_ActionButton != null)
            {
                m_AdHandler.RegisterGameObjectForImpression(m_Root, new Button[] { m_ActionButton });
            }
        }
Esempio n. 2
0
 protected void OnAdTextLoadFinish(INativeAdHandler handler)
 {
     UpdateText();
     if (m_ActionButton != null)
     {
         m_AdHandler.RegisterGameObjectForImpression(m_Root, new Button[] { m_ActionButton });
     }
 }