Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyUp(KeyCode.Return))
     {
         if (GetComponent <InputField> ().text.Length == 0)
         {
             return;
         }
         HighScores.AddNewScore(GetComponent <InputField> ().text, ScoreManager.score());
         HighScores.ShowLeaderBoard();
         DisableHighScoreInput();
     }
 }
Exemplo n.º 2
0
 void OnGUI()
 {
     if (isDead)
     {
         StopTime();
         scoreScript.AddNewScore(currentScore);
         GUI.Box(new Rect(guiBoxX, guiBoxY, guiBoxWidth, guiBoxHeight), deathText);
         if (GUI.Button(new Rect(guiButtonX - (guiButtonWidth / 2), guiButtonY, guiButtonWidth, guiButtonHeight), "OK"))
         {
             Death();
         }
         if (GUI.Button(new Rect(guiButtonX + (guiButtonWidth / 2), guiButtonY, guiButtonWidth, guiButtonHeight), "Quit"))
         {
             Application.Quit();
         }
     }
 }