public void activate(BetterList<RacingAI> aFinishers) { this.gameObject.SetActive(true); aFinishers.Sort(finishPositionSort); int i = 0; for(i = 0;i<aFinishers.size;i++) { completeMembers[i].init(aFinishers[i],i); completeMembers[i].gameObject.SetActive(true); } if(ChampionshipSeason.ACTIVE_SEASON.getTeamFromDriver(completeMembers[0].driver.driverRecord)==ChampionshipSeason.ACTIVE_SEASON.getUsersTeam()) { MobileNativeRateUs ratePopUp = new MobileNativeRateUs("Enjoying Racing Manager?", "Rate us 5 Stars to help with future updates!","5 Stars","Not Right Now","Never!"); #if UNITY_IOS ratePopUp.SetAppleId("975017895"); #endif #if UNITY_ANDROID ratePopUp.SetAndroidAppUrl("market://details?id=com.blueomega.gpmanager"); #endif ratePopUp.addEventListener(BaseEvent.COMPLETE,OnRatePopUpClose); ratePopUp.Start(); } for(int c = i;c<completeMembers.Count;c++) { completeMembers[i].gameObject.SetActive(false); } }
void Rate() { MobileNativeRateUs ratePopUp = new MobileNativeRateUs("Like this game?", "Please rate to support future updates!"); #if UNITY_ANDROID ratePopUp.SetAndroidAppUrl(apdroidAppUrl); #endif #if UNITY_IOS ratePopUp.SetAppleId(appleId); #endif ratePopUp.Start(); }
void OnGUI() { UpdateToStartPos(); GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Native Pop Ups", style); StartY += YLableStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Rate PopUp with events")) { MobileNativeRateUs ratePopUp = new MobileNativeRateUs("Like this game?", "Please rate to support future updates!"); ratePopUp.SetAppleId(appleId); ratePopUp.SetAndroidAppUrl(androidAppUrl); ratePopUp.OnComplete += OnRatePopUpClose; ratePopUp.Start(); } StartX += XButtonStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Dialog PopUp")) { MobileNativeDialog dialog = new MobileNativeDialog("Dialog Titile", "Dialog message"); dialog.OnComplete += OnDialogClose; Invoke("Dismiss", 2.0f); } StartX += XButtonStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Message PopUp")) { MobileNativeMessage msg = new MobileNativeMessage("Message Titile", "Message message"); msg.OnComplete += OnMessageClose; } StartY += YButtonStep; StartX = XStartPos; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Show Prealoder")) { MNP.ShowPreloader("Title", "Message"); Invoke("OnPreloaderTimeOut", 3f); } StartX += XButtonStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Hide Prealoder")) { MNP.HidePreloader(); } }
void OnGUI() { UpdateToStartPos(); GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Native Pop Ups", style); StartY+= YLableStep; if(GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Rate PopUp with events")) { MobileNativeRateUs ratePopUp = new MobileNativeRateUs("Like this game?", "Please rate to support future updates!"); ratePopUp.SetAppleId(appleId); ratePopUp.SetAndroidAppUrl(apdroidAppUrl); ratePopUp.OnComplete += OnRatePopUpClose; ratePopUp.Start(); } StartX += XButtonStep; if(GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Dialog PopUp")) { MobileNativeDialog dialog = new MobileNativeDialog("Dialog Titile", "Dialog message"); dialog.OnComplete += OnDialogClose; } StartX += XButtonStep; if(GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Message PopUp")) { MobileNativeMessage msg = new MobileNativeMessage("Message Titile", "Message message"); msg.OnComplete += OnMessageClose; } StartY += YButtonStep; StartX = XStartPos; if(GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Show Prealoder")) { MNP.ShowPreloader("Title", "Message"); Invoke("OnPreloaderTimeOut", 3f); } StartX += XButtonStep; if(GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Hide Prealoder")) { MNP.HidePreloader(); } }
void Start() { //get session count int sessioncount = PlayerPrefs.GetInt("sessioncount", 0); //Debug.Log (sessioncount); if (sessioncount >= 10 && PlayerPrefs.GetInt("purchase", 0) == 0) { MobileNativeRateUs adsPopUp = new MobileNativeRateUs("No More Sessions", "Watch ads to get more sessions."); adsPopUp.yes = "$1.99 for Unlimited Session"; adsPopUp.no = "No, Wait 12 minutes"; adsPopUp.later = "Yes"; adsPopUp.OnComplete += OnAdsPopUpDialog; adsPopUp.Start(); } }
public void OnBack() { if (getSession) { gameObject.SetActive(false); } else { gameObject.SetActive(false); MobileNativeRateUs adsPopUp = new MobileNativeRateUs("No More Sessions", "Watch ads to get more sessions."); adsPopUp.SetAppleId(""); adsPopUp.SetAndroidAppUrl("market://details?id=com.peakrainbow.missionday"); adsPopUp.yes = "$2.99 for Unlimited Session"; adsPopUp.no = "No, Wait 12 minutes"; adsPopUp.later = "Yes, watch ads"; adsPopUp.OnComplete += OnAdsPopUpClose; adsPopUp.Start(); } }
public void _clickPlay() { gl.gameover = false; int sessioncount = PlayerPrefs.GetInt("sessioncount", 0); if (sessioncount >= 10 && PlayerPrefs.GetInt("purchase", 0) == 0) { MobileNativeRateUs adsPopUp = new MobileNativeRateUs("No More Sessions", "Watch ads to get more sessions."); adsPopUp.yes = "$1.99 for Unlimited Session"; adsPopUp.no = "No, Wait 12 minutes"; adsPopUp.later = "Yes"; adsPopUp.OnComplete += OnAdsPopUpDialog; adsPopUp.Start(); return; } PlayerPrefs.SetInt("sessioncount", ++sessioncount); SceneManager.LoadScene("Play"); }
public void galaxyLoseLife() { if (galaxy.getLives() > 0) { audioDeath.Play(); galaxy.loseLife(); } if (galaxy.getLives() == 0) { audioTimeTicking.Stop(); Timer.Cancel(levelTimer); Timer.Cancel(spawnTimer); Timer.Cancel(hourglassTimer); finalScore = (finalScore == -1 ? finalScore = galaxy.getLevel() * galaxy.getStarsDestroyed() : finalScore); textFinalScore.text = finalScore.ToString(); #if !UNITY_EDITOR if (askRate == 0) { MobileNativeRateUs ratePopUp = new MobileNativeRateUs("Enjoying Falling Stars?", "Please rate to support us.", "Rate Now", "Much much later", "Later"); ratePopUp.SetAndroidAppUrl("https://play.google.com/store/apps/details?id=com.AwkwardTurtleStudios.FallingStars"); ratePopUp.Start(); ratePopUp.OnComplete += OnRatePopUpClose; } else if (askRate > 0) { askRate--; SaveRate(askRate); } if (isConnectedToGoogle) { achievementsAndLeaderBoards(); } #endif } textLives.text = galaxy.getLives().ToString(); }
public void RateApp() { ratePopUp.Start(); }