Quit alert dialog box Android
i need help quickly pleaseee.. i want put the dialog box "are you sure want to quit?" "yes" or "no" in my game 2d because when i touch the exit button, dialog didnt show.
this is my script..
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class uiManager : MonoBehaviour {
public Button[] buttons;
public audioManager am;
bool gameOver;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void gameOverActivated(){
gameOver = true;
foreach (Button button in buttons) {
button.gameObject.SetActive(true);
}
}
public void Play(){
Application.LoadLevel ("level1");
}
public void Menu(){
Application.LoadLevel ("menucover");
}
public void HowToPlay (){
Application.LoadLevel ("howtoplay");
}
public void Exit(){
Application.Quit ();
}
}
Comment
Your answer
