Exemple #1
0
 // Use this for initialization
 void Start()
 {
     if (this.transform.name == "HighScore")
     {
         this.GetComponent <TextMesh>().text = "High score: " + GUIScoreScript.GetHighScore();
     }
     else if (this.transform.name == "LastScore")
     {
         if (GUIScoreScript.GetLastScore() != -1)
         {
             this.GetComponent <TextMesh>().text = "Last score: " + GUIScoreScript.GetLastScore();
         }
         else
         {
             this.GetComponent <TextMesh>().text = "";
         }
     }
 }
Exemple #2
0
 public static void EndGame()
 {
     GUIScoreScript.SaveHighScore();
     Application.LoadLevel("Menu");
     print("end game");
 }