Exemplo n.º 1
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");
        }
    }
Exemplo n.º 2
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");
            }
        }
    }
 public void btnCacheRewardedVideoTapped()
 {
     AppTrackerAndroid.loadModuleToCache("video");
 }
 public void btnCacheInterstitialTapped()
 {
     AppTrackerAndroid.loadModuleToCache("inapp");
 }