public void btnShowInterstitialTapped() { if (AppTrackerAndroid.isAdReady("inapp")) { AppTrackerAndroid.loadModule("inapp"); } }
public void btnShowRewardedVideoTapped() { if (AppTrackerAndroid.isAdReady("video")) { AppTrackerAndroid.loadModule("video"); } }
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; } }
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"); } } }