public void addShowRewardedVideoButton(Rect showRewardedVideoButton) { if (GUI.Button(showRewardedVideoButton, "Show Rewarded Video", guiStyle)) { StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO, adEventListener); } }
public void addShowFullscreenButton(Rect showFullscreenButton) { if (GUI.Button(showFullscreenButton, "Show Fullscreen", guiStyle)) { StartAppWrapper.loadAd(StartAppWrapper.AdMode.FULLPAGE, adEventListener); } }
public void addShowOfferwallButton(Rect showOfferwallButton) { if (GUI.Button(showOfferwallButton, "Show Offerwall", guiStyle)) { StartAppWrapper.loadAd(StartAppWrapper.AdMode.OFFERWALL, adEventListener); } }
public void OnPointerClick(PointerEventData eventData) { Time.timeScale = 1; if (showAds == true) { #if UNITY_ANDROID StartAppWrapper.showAd(); StartAppWrapper.loadAd(); #endif } /*if (Advertisement.IsReady ()) { * Advertisement.Show (); * }*/ level_settings.GetComponent <Level_settings> ().Save_User_Data(); for (int i = 0; i < activate.Count; i++) { activate[i].SetActive(true); } for (int i = 0; i < deactivate.Count; i++) { deactivate[i].SetActive(false); } }
void Start() { if (Application.platform == RuntimePlatform.Android) { StartAppWrapper.loadAd(); } }
//show the ad public void ShowAd() { #if UNITY_ANDROID StartAppWrapper.showAd(); StartAppWrapper.loadAd(); #endif }
//show video ad public void ShowVideoAd() { #if UNITY_ANDROID StartAppWrapper.showAd(); StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO); #endif }
// Use this for initialization void Start() { #if UNITY_ANDROID StartAppWrapper.init(); StartAppWrapper.loadAd(); #endif }
void OnGUI() { if (isAndroidDevice() == false) { return; } if (banner) { StartAppWrapper.addBanner( StartAppWrapper.BannerType.AUTOMATIC, StartAppWrapper.BannerPosition.BOTTOM); banner = false; } if (interstitial) { listener = new Listener(); /*if(interestial_VIDEO) * StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO, listener); * else */if (interestial_OFFERS) { StartAppWrapper.loadAd(StartAppWrapper.AdMode.OFFERWALL, listener); } else if (interestial_FULLPAGE) { StartAppWrapper.loadAd(StartAppWrapper.AdMode.FULLPAGE, listener); } interstitial = false; } }
//init video ad public void InitVideoAd() { #if UNITY_ANDROID VideoListenerImplementation videoListener = new VideoListenerImplementation(); StartAppWrapper.setVideoListener(videoListener); StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO); #endif }
public void launchInterestial() { if (isAndroidDevice() == false) { return; } listener = new Listener(); StartAppWrapper.loadAd(StartAppWrapper.AdMode.FULLPAGE, listener); }
// Use this for initialization void Start() { //Load the ad (after calling the init() function) #if UNITY_ANDROID StartAppWrapper.init(); StartAppWrapper.loadAd(); ShowSplash(); #endif }
IEnumerator toto() { yield return(new WaitForSeconds(2)); //StartAppWrapper.showAd (); yield return(new WaitForSeconds(1)); Debug.Log("Startapp loadAD"); StartAppWrapper.loadAd(); }
// Use this for initialization void Start() { StartAppWrapper.init(); StartAppWrapper.loadAd(); /*StartAppWrapper.addBanner( * StartAppWrapper.BannerType.AUTOMATIC, * StartAppWrapper.BannerPosition.TOP);*/ StartCoroutine(first()); }
//================================ //================================ public void ShowQuitPanel() { Time.timeScale = 0; // this code make time in game frezze and it seem like game in pause. _quitpanel.SetActive(true); #if UNITY_ANDROID StartAppWrapper.init(); StartAppWrapper.loadAd(); ShowSplash(); #endif }
// public void ChangeToScene(int NumberOfScene) { TimeToFade(); Time.timeScale = 1; // this code make time in game run normally and it seem like game is running. SceneManager.LoadScene(NumberOfScene, LoadSceneMode.Single); #if UNITY_ANDROID StartAppWrapper.init(); StartAppWrapper.loadAd(); ShowSplash(); #endif }
// Use this for initialization public void ShowAdd() { #if UNITY_ANDROID StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO); StartAppWrapper.showAd(); StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO); #endif #if UNITY_EDITOR GameDataTracker.AD_Reward = true; #endif }
// public void ChangeToScene(int NumberOfScene) { TimeToFade(); Time.timeScale = 1; // this code make time in game run normally and it seem like game is running. SceneManager.LoadScene(NumberOfScene, LoadSceneMode.Single); #if UNITY_ANDROID VideoListenerImplementation videoListener = new VideoListenerImplementation(); StartAppWrapper.setVideoListener(videoListener); StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO); ShowVideo(); #endif }
void Update() { #if UNITY_ANDROID if (Input.GetKeyUp(KeyCode.Escape)) { if (StartAppWrapper.onBackPressed(gameObject.name) == false) { StartAppWrapper.showAd(); StartAppWrapper.loadAd(); exit(); } } #endif }
// Use this for initialization void Awake() { GameObject HUDcanvas = GameObject.FindGameObjectWithTag("HUDCanvas"); anim = HUDcanvas.GetComponent <Animator> (); text = GetComponent <Text> (); score = 0; #if UNITY_ANDROID StartAppWrapper.init(); StartAppWrapper.loadAd(); #endif }
void OnGUI() { #if UNITY_ANDROID StartAppWrapper.showSplash(new StartAppWrapper.SplashConfig() .setTheme(StartAppWrapper.SplashConfig.Theme.OCEAN) .setAppName("Hook and Woosh") //.setLogo("XonderSquare360") .setOrientation(StartAppWrapper.SplashConfig.Orientation.AUTO) ); StartAppWrapper.showSplash(); StartAppWrapper.init(); //StartAppWrapper.loadAd(); StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO); #endif }
// Use this for initialization void Start() { // PlayerPrefs.DeleteAll(); Invoke("HideSplashScreen", 3f); Lives = 3; s = true; ExitControl = false; ss = true; OnlyForExit = false; Time.timeScale = 1; ExitAnim = ExitMenu.GetComponent <Animator>(); DontDestroyOnLoad(gameObject); #if UNITY_ANDROID StartAppWrapper.init(); StartAppWrapper.loadAd(); #endif }
// Update is called once per frame void Update() { //text.text = "Score: " + score; text.text = "Score: " + GameDataTracker.GameScore; if (GameDataTracker.Lives <= 0) { //SHOW STARTAPP INTERSTIATIAL EVERY 2 RUNS if (GameDataTracker.GameRuns % 3 == 0 && GameDataTracker.AD_AlreadyShown == false) { //if true => Show ad #if UNITY_ANDROID StartAppWrapper.showAd(); StartAppWrapper.loadAd(); #endif GameDataTracker.AD_AlreadyShown = true; } //Report Score to leaderboard // GameObject ExitDoor = GameObject.FindGameObjectWithTag("ExitDoor"); Destroy(ExitDoor); GameObject BALL = GameObject.FindGameObjectWithTag("Ball"); DestroyObject(BALL); // ... tell the animator the game is over. anim.SetTrigger("GameOver"); // .. increment a timer to count up to restarting. restartTimer += Time.deltaTime; //ADD SUCCES SCREEN MOT GAMER OVER AND SHOW PROGRESS // .. if it reaches the restart delay... if (restartTimer >= restartDelay) { GameDataTracker.Reset(); // .. then reload the currently loaded level. //Application.LoadLevel(Application.loadedLevel); UnityEngine.SceneManagement.SceneManager.LoadScene("MainMenu", UnityEngine.SceneManagement.LoadSceneMode.Single); } } }
public void OnPointerClick(PointerEventData eventData) { #if UNITY_ANDROID StartAppWrapper.showAd(); StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO); #endif if (Application.internetReachability != NetworkReachability.NotReachable) { if (gold == true) { gold_menu.SetActive(true); PlayerPrefs.SetInt("gold", PlayerPrefs.GetInt("gold") + amount); PlayerPrefs.Save(); } else { gem_menu.SetActive(true); PlayerPrefs.SetInt("gem", PlayerPrefs.GetInt("gem") + amount); PlayerPrefs.Save(); } } }