public void btnShowRewardedVideoTapped()
 {
     if (AppTrackerAndroid.isAdReady("video"))
     {
         AppTrackerAndroid.loadModule("video");
     }
 }
 public void btnShowInterstitialTapped()
 {
     if (AppTrackerAndroid.isAdReady("inapp"))
     {
         AppTrackerAndroid.loadModule("inapp");
     }
 }
Esempio n. 3
0
    void Start()
    {
        if (RemoveAds.control.adsfree != true)
        {
            try
            {
                //Requesting LeadBolt Ads
                if (AppTrackerAndroid.isAdReady("inapp"))
                {
                    AppTrackerAndroid.loadModule("inapp");
                }
            }
            catch
            {
            }
        }

        Score.text = "Score: " + PlayerPrefs.GetInt("Score").ToString();
        if (PlayerPrefs.GetInt("Score") > PlayerPrefs.GetInt("HighScore"))
        {
            NewBest.GetComponent <Text>().enabled = true;
        }
        else if (PlayerPrefs.GetInt("Score") < PlayerPrefs.GetInt("HighScore"))
        {
            NewBest.GetComponent <Text>().enabled = false;
        }
    }
Esempio n. 4
0
//	private int count = -1;

    void Start()
    {
        Screen.orientation = ScreenOrientation.AutoRotation;                //to allow orientation other than portrait
                #if UNITY_ANDROID
        AppTrackerAndroid.startSession("jfjZbrPtdR3mcZW9r83Bx9pB8I5PXvpb"); // Please change this demo API Key to your own API Key
        AppTrackerAndroid.onModuleClosedEvent += onModuleClosedEvent;
        AppTrackerAndroid.onModuleFailedEvent += onModuleFailedEvent;
        AppTrackerAndroid.onModuleLoadedEvent += onModuleLoadedEvent;
        AppTrackerAndroid.onModuleCachedEvent += onModuleCachedEvent;
                #endif
    }
Esempio n. 5
0
    // Use this for initialization
    void Start()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        Invoke("Maker", 0f);

        if (RemoveAds.control.adsfree != true)
        {
            // Initialize Leadbolt SDK with your API Key
            AppTrackerAndroid.startSession("UGHgCqyAnyqHerqxWXJJVE8HkZXJ1cGU", true);

            // cache Leadbolt Ad without showing it
            AppTrackerAndroid.loadModuleToCache("inapp");
        }
    }
Esempio n. 6
0
    void OnGUI()
    {
        float w = Screen.width;
        float h = Screen.height;

        float scale = Mathf.Min(4.0f, Mathf.Min(w / 240.0f, h / 210.0f));

        GUI.matrix = Matrix4x4.Scale(new Vector3(scale, scale, 1));

        float width = (int)(w / scale) - 30;


        // setup buttons
        Texture2D logo = Resources.Load("head") as Texture2D;

        GUILayout.Label(logo, GUILayout.Height(150), GUILayout.Width(316));

        GUILayout.Space(5);
        GUILayout.Label("Interstitial Ad Ready: " + hasInterstitial);
        if (GUILayout.Button("Cache Interstitial", GUILayout.Width(width)))
        {
            AppTrackerAndroid.loadModuleToCache("inapp");
        }
        if (GUILayout.Button("Load Interstitial", GUILayout.Width(width)))
        {
            if (AppTrackerAndroid.isAdReady("inapp"))
            {
                AppTrackerAndroid.loadModule("inapp");
            }
        }

        GUILayout.Space(5);
        GUILayout.Label("Rewarded Video Ready: " + hasRewardedVideo);
        if (GUILayout.Button("Cache Rewarded Video", GUILayout.Width(width)))
        {
            AppTrackerAndroid.loadModuleToCache("video");
        }
        if (GUILayout.Button("Show Rewarded Video", GUILayout.Width(width)))
        {
            if (AppTrackerAndroid.isAdReady("video"))
            {
                AppTrackerAndroid.loadModule("video");
            }
        }
    }
 // Use this for initialization
 void Start()
 {
     AppTrackerAndroid.startSession("ENTER_YOUR_API_KEY");          // Please change this demo API Key to your own API Key
 }
 public void btnCacheRewardedVideoTapped()
 {
     AppTrackerAndroid.loadModuleToCache("video");
 }
 public void btnCacheInterstitialTapped()
 {
     AppTrackerAndroid.loadModuleToCache("inapp");
 }