コード例 #1
0
 public void OnGUI()
 {
     if (GUI.Button(new Rect(40, 40, Screen.width - 80, 80), "Show Ad") == true)
     {
         AdBuddizBinding.ShowAd();
     }
 }
コード例 #2
0
    public void OnGUI()
    {
        GUIStyle style = new GUIStyle(GUI.skin.button);

        style.fontSize = 50;

        if (GUI.Button(new Rect(40, 40, Screen.width - 80, 120), "Show Interstitial Ad", style) == true)
        {
            AdBuddizBinding.ShowAd();
        }
        if (GUI.Button(new Rect(40, 240, Screen.width - 80, 120), "Fetch Rewarded Video Ad", style) == true)
        {
            AdBuddizBinding.RewardedVideo.Fetch();
        }
        if (GUI.Button(new Rect(40, 400, Screen.width - 80, 120), "Show Rewarded Video Ad", style) == true)
        {
            AdBuddizBinding.RewardedVideo.Show();
        }
    }
コード例 #3
0
    private IEnumerator WaitForRequest(WWW www)
    {
        yield return(www);

        Debug.Log("*" + www.error + "*");
        // check for errors
        if (www.error == "" || www.error == null)
        {
            PlayerPrefs.SetString("jsonData", www.text);
            jsonToList();
            GameObject.Find("MainGameObject").GetComponent <MainGameObject>().refreshListFleet();
            if (UnityEngine.Random.Range(1, 3) == 1)
            {
                AdBuddizBinding.ShowAd();
            }
        }
        else
        {
            Debug.Log("WWW Error: " + www.error);
        }
    }
コード例 #4
0
 void ShowAd()
 {
     prologue.enabled = false;
     AdBuddizBinding.ShowAd();
 }
コード例 #5
0
 void didFailToCacheChartboost(string location, string error) //SE CHARTBOOST FALHAR
 {
     AdBuddizBinding.ShowAd();                                //mostra AdBuddiz
 }