Ejemplo n.º 1
0
    public void OnMouseUp()
    {
        int finalScore = LevelGenerator.GetlevelPartCount() + Coin.chupetes - 5;

        HighscoreNameInputWindow.Show(finalScore, (string name) => {
            HighscoreTable.AddHighscoreEntry_Static(finalScore, name);
            HighscoreTable.Show();
        });
        pre_score.SetActive(false);
    }
Ejemplo n.º 2
0
 private void Awake()
 {
     instance       = this;
     nameText       = transform.Find("nameText").GetComponent <Text>();
     scoreText      = transform.Find("scoreText").GetComponent <Text>();
     nameInputField = transform.Find("nameText").GetComponent <InputField>();
     nameInputField.onValidateInput = (string text, int charIndex, char addedChar) => {
         if (addedChar == ' ')
         {
             return('\0');                  // Don't add spaces
         }
         return(addedChar.ToString().ToUpper()[0]);
     };
     gameObject.SetActive(false);
 }