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); } }
//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); } }
public void OnSubmit() { PlayerPrefs.SetString("User", username.text); HighScores.AddNewHighscore(username.text, Score.distance); HideComponent(username); HideComponent(submitUsername); }
public void UpdateHighscore() { if (PlayerPrefs.HasKey("User")) { HighScores.AddNewHighscore(PlayerPrefs.GetString("User"), Score.distance); } }
public void EnterP1Name() { name = InputText.text.ToString(); if (string.IsNullOrEmpty(name)) { name = "UNKNOWN"; } else { NameButton.enabled = false; buttonText.text = " OK"; HighScores.AddNewHighscore(name, score); } }
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); } }
public void SaveScore() { HighScores.AddNewHighscore(nameField.text, DBManager.coin); update.SetActive(false); }
//Submit score to leaderboard public void submit() { highScores.AddNewHighscore(name, score); }
public void Savescore() { HighScores.AddNewHighscore(userInput.text, DBManager.score); StartCoroutine(disableObject()); }