AddNewHighscore() public static method

public static AddNewHighscore ( string username, int score ) : void
username string
score int
return void
 public void RetryButton()
 {
     if (cancel == true)
     {
         fading.DisappearConnectionErrorMessageCanvas();
         highScores.DownloadHighscores();
     }
     else
     {
         fading.DisappearConnectionErrorMessageCanvas();
         highScores.AddNewHighscore(playerName, (int)score, (int)wave);
     }
 }
Exemplo n.º 2
0
    //Show the correct Screen based on static Variables considering if a prior game was just played
    void Start()
    {
        kills = GameOver.Killser.ToString();
        round = GameOver.Rounder.ToString();
        if (GameOver.LegendQuery == false)
        {
            legend = "Undetermined";
        }
        else
        {
            legend = "Confirmed";
        }
        RoundText.text  = round;
        KillsText.text  = kills;
        LegendText.text = legend;

        if (GameOver.GameOverQuery == true)
        {
            HighS.AddNewHighscore(UsernameScript.Username, GameOver.Rounder);
            GameOverScener.SetActive(true);
            UIScener.SetActive(false);
            leaderScener.SetActive(false);
            OptionScener.SetActive(false);
            inputField.text = UsernameScript.Username;
        }
        else
        {
            GameOverScener.SetActive(false);
            UIScener.SetActive(true);
            leaderScener.SetActive(false);
            OptionScener.SetActive(false);
        }
    }
Exemplo n.º 3
0
 public void OnSubmit()
 {
     PlayerPrefs.SetString("User", username.text);
     HighScores.AddNewHighscore(username.text, Score.distance);
     HideComponent(username);
     HideComponent(submitUsername);
 }
Exemplo n.º 4
0
 public void UpdateHighscore()
 {
     if (PlayerPrefs.HasKey("User"))
     {
         HighScores.AddNewHighscore(PlayerPrefs.GetString("User"), Score.distance);
     }
 }
Exemplo n.º 5
0
 public void EnterP1Name()
 {
     name = InputText.text.ToString();
     if (string.IsNullOrEmpty(name))
     {
         name = "UNKNOWN";
     }
     else
     {
         NameButton.enabled = false;
         buttonText.text    = "      OK";
         HighScores.AddNewHighscore(name, score);
     }
 }
Exemplo n.º 6
0
    void OnGUI()
    {
        if (InputField.isFocused && InputField.text != "" && Input.GetKey(KeyCode.Return))
        {
            theName = inputField.GetComponent <Text>().text;
            Debug.Log(theName);
            InputField.text = "";
            int theScore = (int)ScoreManager.instance.scoreCount;
            HighScores.AddNewHighscore(theName, theScore);
            gameObject.SetActive(false);
        }

        if (InputField.text != "" && mobileKeys != null && mobileKeys.status == TouchScreenKeyboard.Status.Done)
        {
            theName = inputField.GetComponent <Text>().text;
            Debug.Log(theName);
            InputField.text = "";
            int theScore = (int)ScoreManager.instance.scoreCount;
            HighScores.AddNewHighscore(theName, theScore);
            gameObject.SetActive(false);
        }
    }
Exemplo n.º 7
0
 public void SaveScore()
 {
     HighScores.AddNewHighscore(nameField.text, DBManager.coin);
     update.SetActive(false);
 }
Exemplo n.º 8
0
 //Submit score to leaderboard
 public void submit()
 {
     highScores.AddNewHighscore(name, score);
 }
Exemplo n.º 9
0
 public void Savescore()
 {
     HighScores.AddNewHighscore(userInput.text, DBManager.score);
     StartCoroutine(disableObject());
 }