Beispiel #1
0
 public static void showAdOnRightCondition()
 {
     Debug.Log("ad timed played: " + PlayerPrefs.GetFloat("adTimePlayed"));
     if (PlayerPrefs.GetFloat("adTimePlayed") > 90f)
     {
         ChartboostExample.runAd();
         PlayerPrefs.SetFloat("adTimePlayed", 0f);
     }
 }
Beispiel #2
0
 public static void loadAd()
 {
     if ((PlayerPrefs.GetInt("GameTime") >= 100 || PlayerPrefs.GetInt("adIteration") >= 5))            //&& PlayerPrefs.GetString("ads") != "false") {
     {
         float randomNum = UnityEngine.Random.Range(0f, 100f);
         ChartboostExample.runAd();
         PlayerPrefs.SetInt("adIteration", 0);
         PlayerPrefs.SetInt("GameTime", 0);
         Application.LoadLevel("Scene1");
     }
 }