Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mainMenuSceneName : String;
- var pauseMenuFont : Font;
- private var pauseEnabled = false;
- function Start(){
- pauseEnabled = false;
- Time.timeScale = 1;
- AudioListener.volume = 1;
- Screen.showCursor = false;
- }
- function Update(){
- pauseEnabled = true;
- AudioListener.volume = 1;
- Time.timeScale = 1;
- Screen.showCursor = true;
- }
- private var showGraphicsDropDown = false;
- function OnGUI(){
- GUI.skin.box.font = pauseMenuFont;
- GUI.skin.button.font = pauseMenuFont;
- if(pauseEnabled == true){
- //Make a background box
- GUI.Box(Rect(Screen.width /2 - 600,Screen.height /2 - 270,250,250), "Quoi de neuf?");
- GUI.TextArea(Rect(Screen.width /2 - 600,Screen.height /2 - 250,250,250), "- Ajout de la map WTF?! - Ajout de la musique d'ambiance sur la map WTF?! -Viens suivre le dรฉveloppement du jeu sur Actu-Gamework! http://forum.actu-gamework.com :) ");
- //Make Main Menu button
- {if(GUI.Button(Rect(Screen.width / 2 - 600, Screen.height / 2 - -250, 200, 50), "Jouer"));
- Application.LoadLevel("CompleteScene");}
- {if(GUI.Button(Rect(Screen.width / 2 - 600, Screen.height / 2 - -200, 200, 50), "Jouer sur la map WTF?!"));
- Application.LoadLevel("map 2");}
- //Make Change Graphics Quality button
- if(GUI.Button(Rect(Screen.width / 2 - 350, Screen.height / 2 - -250, 200, 50), "Options")){
- if(showGraphicsDropDown == false){
- showGraphicsDropDown = true;
- }
- else{
- showGraphicsDropDown = false;
- }
- }
- //Create the Graphics settings buttons, these won't show automatically, they will be called when
- //the user clicks on the "Change Graphics Quality" Button, and then dissapear when they click
- //on it again....
- if(showGraphicsDropDown == true){
- if(GUI.Button(Rect(Screen.width /2 - 350,Screen.height /2 - 50,250,50), "Tres bas")){
- QualitySettings.currentLevel = QualityLevel.Fastest;
- }
- if(GUI.Button(Rect(Screen.width /2 - 350,Screen.height /2 + 0,250,50), "Bas")){
- QualitySettings.currentLevel = QualityLevel.Fast;
- }
- if(GUI.Button(Rect(Screen.width /2 - 350,Screen.height /2 + 50,250,50), "Normale")){
- QualitySettings.currentLevel = QualityLevel.Simple;
- }
- if(GUI.Button(Rect(Screen.width /2 - 350,Screen.height /2 + 100,250,50), "Bien")){
- QualitySettings.currentLevel = QualityLevel.Good;
- }
- if(GUI.Button(Rect(Screen.width /2 - 350,Screen.height /2 + 150,250,50), "Elever")){
- QualitySettings.currentLevel = QualityLevel.Beautiful;
- }
- if(GUI.Button(Rect(Screen.width /2 - 350,Screen.height /2 + 200,250,50), "Ultra")){
- QualitySettings.currentLevel = QualityLevel.Fantastic;
- }
- if(Input.GetKeyDown("escape")){
- showGraphicsDropDown = false;
- }
- }
- //Make quit game button
- if (GUI.Button (Rect (Screen.width / 2 - 100, Screen.height / 2 - -250, 200, 50), "Quitter le jeu")){
- Application.Quit();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement