コード例 #1
0
    public void OnCLick()
    {
        bool ready = false;

        switch (style)
        {
        case BTN_STYLE.ShowVideo:
            ready = ADFlyHiSDK.isVideoReady();
            Debug.Log(ready);
            if (ready)
            {
                ADFlyHiSDK.ShowVideo();
            }
            break;

        case BTN_STYLE.ShowFullScreen:
            ready = ADFlyHiSDK.isFullScreenReady();
            Debug.Log(ready);
            if (ready)
            {
                ADFlyHiSDK.ShowFullScreen();
            }
            break;
        }
    }
コード例 #2
0
ファイル: Example.cs プロジェクト: AlphaDoug/RibbonChaseV2.0
    // Use this for initialization
    void Start()
    {
        ADFlyHiSDK.OnAdShowSuccess = OnAdShowSuccess;
        ADFlyHiSDK.OnAdShowFail    = OnAdShowFail;

        ADFlyHiSDK.init("a100170000", "a100170001", ADFlyHiSDK.Oritation.Landscape, true);
    }
コード例 #3
0
    private void Start()
    {
        //预加载广告
        //TGSDK.Initialize("469604ox8m553x9LJrLa");
        //TGSDK.PreloadAd();
        ADFlyHiSDK.OnAdShowSuccess = OnAdShowSuccess;
        ADFlyHiSDK.OnAdShowFail    = OnAdShowFail;

        ADFlyHiSDK.init("a100170000", "a100170001", ADFlyHiSDK.Oritation.Landscape, false);
        ADFlyHiSDK.PreloadVideo();
    }
コード例 #4
0
ファイル: PlayAds.cs プロジェクト: AlphaDoug/RibbonChaseV2.0
 void Update()
 {
     t++;
     if (t > 30)
     {
         t = 0;
         if (ADFlyHiSDK.isVideoReady())
         {
             GetComponent <Image>().color = new Color(1, 1, 1);
             //    if (PlayerPrefs.HasKey("language"))
             //    {
             if (PlayerPrefs.GetInt("language") == 0)
             {
                 //中文
                 text1.text = "填充完毕";
             }
             else
             {
                 //英文
                 text1.text = "Ready";
             }
             //    }
         }
         else
         {
             GetComponent <Image>().color = new Color(0.6f, 0.6f, 0.6f);
             //  if (PlayerPrefs.HasKey("language"))
             //  {
             if (PlayerPrefs.GetInt("language") == 0)
             {
                 //中文
                 text1.text = "正在填充...";
             }
             else
             {
                 //英文
                 text1.text = "loading...";
             }
             //  }
         }
     }
 }
コード例 #5
0
ファイル: PlayAds.cs プロジェクト: AlphaDoug/RibbonChaseV2.0
 public void Ads()
 {
     if (ADFlyHiSDK.isVideoReady())
     {
         // text1.text = "播放成功";
         ADFlyHiSDK.ShowVideo();
     }
     else
     {
         if (PlayerPrefs.GetInt("language") == 0)
         {
             //中文
             text1.text = "正在填充...";
         }
         else
         {
             //英文
             text1.text = "loading...";
         }
     }
 }