Ejemplo n.º 1
0
	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);
		}
	}
Ejemplo n.º 2
0
	void Start() {

		//rate us
		if (ratePopUp == null) {
			ratePopUp = new MobileNativeRateUs ("Like this game?", "Please rate to support future updates!");
			ratePopUp.SetAppleId ("916270150");
			ratePopUp.SetAndroidAppUrl ("https://play.google.com/store/apps/details?id=com.tap.colorfun");
			ratePopUp.addEventListener(BaseEvent.COMPLETE, OnRatePopUpClose);
		}
	}
Ejemplo n.º 3
0
	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.addEventListener(BaseEvent.COMPLETE, 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.addEventListener(BaseEvent.COMPLETE, OnDialogClose);
		}
		
		
		StartX += XButtonStep;
		if(GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Message PopUp")) {
			MobileNativeMessage msg = new MobileNativeMessage("Message Titile", "Message message");
			msg.addEventListener(BaseEvent.COMPLETE, 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();
		}
		
	}