- Home /
How to add play again or quit dialog
Hello so its me again, I need quick help :) After my life is 0 in my game I want to add a Dialog that will ask user if he wants to play again or quit the game. I really don't know how to do that. I just made Void GameOver() that resets life and current score and start over with Void Start() function But now I want to make it in the GameOver function that will open Dialog with 2 buttons that will say Play Again or Quit. IF you can do that please tell me how, I am dying here :sss Thanks guys!!
Answer by rutter · May 28, 2014 at 07:23 PM
You're looking for some tutorials.
How to set up a basic GUI. You can use GUI or GUILayout to labels and buttons. Google around a bit, there are quite a few tutorials out there. Maybe start with the GUI manual.
How to load (or reload) levels. Again, there are plenty of tutorials.
Set up two levels:
Gameplay level
Game over level
Once the player loses, load the game over level (which shows your buttons). One button reloads the main level, the other puts you back to the main menu (or whatever).
Well thank you for your answer :) I will take a look for sure! :) I want to show 2 GUIs buttons on the same screen when the game is over. But i really don't know how... :S So yeah i will also search around little more time :) thx
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to reset the custom couser 1 Answer
Out of order Please help 1 Answer
Define in Inspector which variable will be set from which script 1 Answer