Exemple #1
0
	void Update() {
		if (Input.GetKeyDown(KeyCode.Escape)) {
			MobileNativeDialog dialog = new MobileNativeDialog("Info", "Do you want to quit this game ?");
			dialog.addEventListener(BaseEvent.COMPLETE, OnDialogClose);
			
		}
	}
Exemple #2
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();
		}
		
	}
Exemple #3
0
	// Update is called once per frame
	void Update () {
		if (Time.time >= lastRotate && circleTime.fillAmount < 1 && playing) {
			circleTime.fillAmount += delta;
			lastRotate = Time.time + rotateRate;
			if (circleTime.fillAmount >= 1) {
				//newLevel();
				GameOver();
			}
		}
		if (Input.GetKeyDown(KeyCode.Escape)) {
			MobileNativeDialog dialog = new MobileNativeDialog("Info", "Do you want back to main menu ?");
			dialog.addEventListener(BaseEvent.COMPLETE, OnDialogClose);
			Time.timeScale = 0;
		}
	}