public void disableFirstTimePanel() { highscoreInstance.ClearLeaderboard(); highscoreInstance.AddNewHighscore(givenName, high); if (givenName != "") { firstTimePanel.SetActive(false); } }
public void SetHighscore(int score) //Sets Client and Server Score { if (score == CountJumpObjects()) { Highscores.AddNewHighscore(CountJumpObjects()); } else { adManager.showEveryN = 0; //Thank the hacker for ma Ads! PlayerPrefs.SetInt("HasHacked", 1); } SetLocalHighscore(score); if (adManager) { adManager.DelayAd(); CheckColor(); } if (hintManager) { hintManager.RewardPlayer(); hintManager.ToggleHints(true); } if (analyticsManager) { analyticsManager.OnHighscoreReached(score); } }
public void OK() { panel.gameObject.SetActive(false); endUsername.text = username; endUsername.gameObject.SetActive(true); Highscores.AddNewHighscore(username, score); }
void Update() { if (restart) { if ((Input.touchCount > 0) || Input.GetButton("Fire1") || Input.GetMouseButtonDown(0)) { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); } } if (Input.GetKeyDown(KeyCode.Escape) || Input.GetButton("Cancel")) { if (score > 0) { PlayerPrefs.SetInt("normalScore", score); Highscores.AddNewHighscore(username, score); } /* if (PlayerPrefs.HasKey("normalHighscore")) * { * if (PlayerPrefs.GetInt("normalHigscore") < PlayerPrefs.GetInt("normalScore")) * PlayerPrefs.SetInt("normalHighscore", PlayerPrefs.GetInt("normalScore")); * } * else * PlayerPrefs.SetInt("normalHighscore", score);*/ } }
void Start() { string HtmlText = GetHtmlFromUri("http://google.com"); if (HtmlText == "") { Debug.Log("Connection Not Found"); } else { if (PlayerPrefs.HasKey("normalHighscore")) { Highscores.AddNewHighscore(PlayerPrefs.GetString("player"), PlayerPrefs.GetInt("normalHighscore")); PlayerPrefs.SetInt("normalHighscore", 0); } if (PlayerPrefs.HasKey("casualHighscore")) { CasualHighscores.AddNewHighscore(PlayerPrefs.GetString("player"), PlayerPrefs.GetInt("casualHighscore")); PlayerPrefs.SetInt("casualHighscore", 0); } if (PlayerPrefs.HasKey("tonyHighscore")) { TonysHighscores.AddNewHighscore(PlayerPrefs.GetString("player"), PlayerPrefs.GetInt("tonyHighscore")); PlayerPrefs.SetInt("tonyHighscore", 0); } } }
void ChangeScore(string _username, int _score) { int score = _score; string username = _username; Highscores.AddNewHighscore(username, score); }
public void showCanvas() { first_canvas.gameObject.SetActive(false); resultCanvas.gameObject.SetActive(true); _username = PlayerPrefs.GetString("Username"); for (int z = 0; z < len; z++) { if (highscoresList[z].username == _username) { _score = highscoresList[z].score; break; } } if (wrong1.interactable == false && wrong2.interactable == false) { scoreText.text = "10/10"; _score = _score + 10; Highscores.AddNewHighscore(_username, _score); } else if (wrong1.interactable == false || wrong2.interactable == false) { scoreText.text = "5/10"; _score = _score + 5; Highscores.AddNewHighscore(_username, _score); } else { scoreText.text = "0/10"; _score = _score + 0; Highscores.AddNewHighscore(_username, _score); } }
public void uploadScore() { int score = GameObject.FindGameObjectWithTag("Player").GetComponent <LevelGenerate>().score; Highscores.AddNewHighscore(nametxt.text, score); done.SetActive(true); lbbtn.SetActive(true); }
public void OnClickAdd() { if (!String.IsNullOrEmpty(_nameField.text.ToString())) { Highscores.AddNewHighscore(_nameField.text.ToString(), Int32.Parse(_scoreField.text.ToString())); } _addButton.interactable = false; }
public void wyslijWynik(string nazwa) { FinishScores = Mathf.RoundToInt(globalPoints * 3 - Time.time - timerValue); wpisywaniePole.interactable = false; Highscores.AddNewHighscore(nazwa, FinishScores); InformacjaOWpisaniu.text = "Dodano wynik!"; }
public void BTTN() { PlayerPrefs.SetInt("value", Score.scoreValue); myName = iField.text; Highscores.AddNewHighscore(myName, Score.scoreValue); inputField.SetActive(false); bns.interactable = false; }
public IEnumerator GameOverCoroutine() { _highscores.AddNewHighscore(username, _totScore); yield return(new WaitForSeconds(waitTime)); _placeHolder.SetActive(true); Debug.Log("Returning to Start scene..."); }
public void OnClick() { username = GetComponent <InputField>().text; username = GetUniqueID(username); HighscoreUI.SetActive(true); UserInputUI.SetActive(false); Highscores.AddNewHighscore(username, (int)score); }
public void OnSubmit() { charName = nameField.text; Debug.Log("Your name: " + charName); //TODO: GRAB SCORE VALUE FROM AR WORLD SCENE Highscores.AddNewHighscore(charName, PlayerPrefs.GetInt("player_score")); MakeActive(); }
private void Awake() { instance = this; aSource = this.GetComponent <AudioSource>(); ExtLibControl.OnCommandCalled += UserActionControl; tasksToDisp = TaskQueueList.childCount - 1; TaskQueueList.parent.GetComponent <Toggle>().onValueChanged .AddListener(v => { PersistentScript.ClickSfx(); TaskQueueList.gameObject.SetActive(v); if (v) { UpdateTaskQueueList(); } }); //tasklist FileMenuContent = FileMenu.GetChild(0).GetChild(0); FileMenu.GetComponentInChildren <TextMeshProUGUI>().text = PersistentScript.currentMap?.name + "-Menu"; FileMenu.GetComponent <Toggle>().onValueChanged //FileMenuButton .AddListener(v => { PersistentScript.ClickSfx(); FileMenuContent.gameObject.SetActive(v); }); FileMenuContent.GetChild(0).GetComponent <Toggle>().onValueChanged //PauseButton .AddListener(v => { PersistentScript.ClickSfx(); PauseLevel(v); }); FileMenuContent.GetChild(1).GetComponent <Toggle>().onValueChanged //RestartButton .AddListener(v => { PersistentScript.ClickSfx(); ReloadLevel(); }); FileMenuContent.GetChild(2).GetComponent <Toggle>().onValueChanged //NewFileButton .AddListener(v => { PersistentScript.ClickSfx(); NewFile(); }); FileMenuContent.GetChild(3).GetComponent <Toggle>().onValueChanged //MainMenuButton .AddListener(delegate { PersistentScript.ClickSfx(); SceneManager.LoadScene(0); PersistentScript.currentMap = null; }); //MessageBox MessageBoxOkButton.onClick.AddListener(delegate { PersistentScript.ClickSfx(); MessageBox.gameObject.SetActive(false); PauseLevel(false); PersistentScript.incomingMessage = null; }); //GameoverBox GameOverBoxSendButton.onClick.AddListener(delegate { PersistentScript.ClickSfx(); GameOverBox.gameObject.SetActive(false); if (PersistentScript.usr != null) { instance.GameOverBoxInput.text = PersistentScript.usr.givenName; } var name = instance.GameOverBoxInput.text; if (!string.IsNullOrEmpty(name)) { name = name.Replace('*', ' ').Replace('|', ' '); Highscores.AddNewHighscore(name + "§§" + DateTime.Now.ToOADate() + "§§" + PersistentScript.userSecretValue, (int)PersistentScript.lastScore); } ReloadLevel();/*send score*/ }); //{ name = name.Replace('*', ' ').Replace('|', ' '); Highscores.AddNewHighscore(name + "§§" + DateTime.Now.ToOADate(), (int)PersistentScript.lastScore); } }
public void StoreNamePlayer(string namePlayer, float distance) { if (namePlayer == "Enter your name...") { namePlayer = "???"; } highscoreScript.AddNewHighscore(namePlayer, Mathf.Round(distance / 1000f)); }
public void AddHighscore() { Highscores.AddNewHighscore(DBManager.username, DBManager.score); //precedente utilizzo /*if (PointsControllerActivator.points != 0 && PointsControllerActivator2.points==0 && PointsControllerActivator3.points==0) Highscores.AddNewHighscore(ProfileUse.profileName+"-level01", PointsControllerActivator.points); * if (PointsControllerActivator.points != 0 && PointsControllerActivator2.points != 0&&PointsControllerActivator3.points==0) Highscores.AddNewHighscore(ProfileUse.profileName+"-level02", PointsControllerActivator.points+PointsControllerActivator2.points); * if (PointsControllerActivator.points != 0 && PointsControllerActivator2.points != 0&&PointsControllerActivator3.points!=0) Highscores.AddNewHighscore(ProfileUse.profileName + "-Completed", PointsControllerActivator.points + PointsControllerActivator2.points+PointsControllerActivator3.points);*/ }
public void Submit() { string name = (submit.text).ToUpper(); Highscores.AddNewHighscore(name, Mathf.FloorToInt(Distance)); EndGameGO[0].SetActive(false); EndGameGO[1].SetActive(true); submitted = true; }
public void OnClickSubmit() { username = inputField.text; UniqID.GetUniqueID(username); highscoreUI.SetActive(true); userInputUI.SetActive(false); Highscores.AddNewHighscore(username, (int)Score.finalScore); Highscores.writeToTMProFields(displayHighscores.highscoreFields); }
public void SendScore() { #if !UNITY_EDITOR AnalyticsController.Controller.SendScore(); AnalyticsController.Controller.SendName(text.text, Time.time); AnalyticsController.Controller.CharacterID(characterNumber); #endif //SceneManager.LoadScene(0); Highscores.AddNewHighscore(text.text, Score.Points); }
public void onButtonPress() { int points = PlayerPrefs.GetInt("playerPoints"); if (user.text == null) { return; } highscoresManager.AddNewHighscore(user.text, points); bedanktScherm.SetActive(false); }
public void SubmitScore(string name) { if (input.text != "") { name = input.text; Highscores.AddNewHighscore(name, scoreManage.Score); input.text = ""; input.gameObject.SetActive(false); FlashingText.gameObject.SetActive(true); hiscoredisplaybtn.gameObject.SetActive(true); } }
public void SubmitScore() { string nick = inputField.text; if (!String.IsNullOrWhiteSpace(nick)) { Highscores.AddNewHighscore(nick, score.scoreValue); inputField.text = ""; submitButton.interactable = false; Hide(); } }
void validateAndSubmit(string fieldValue) { if (isInvalid(fieldValue)) { return; } Highscores.AddNewHighscore(fieldValue, playerDistanceComponent.neutrinoPercurredDistance); SubmitPanel?.SetActive(false); // change to whatever you want to run when user submits // doSomething(_inputField); // or doSomething(fieldValue); }
public void submit() { if (InputUser.text != "") { username = InputUser.text; Highscores.AddNewHighscore(username, GameControl.control.timeScore); } else { return; } }
private void UploadTime() { highscores = Instantiate(highscores); string playerName = SceneTransitionValues.playerName; if (String.IsNullOrEmpty(playerName)) { playerName = SaveLoadManager.Load().GetPlayerName(); } Highscores.AddNewHighscore(SceneTransitionValues.currentSceneName, playerName, SceneTransitionValues.time); }
public void loadAndScore() { if (MyGameManager.level == 3) { Highscores.AddNewHighscore(Highscores.UserName, MyGameManager.score); } MyGameManager.p_health = 5; MyGameManager.score = 0; SceneManager.LoadScene(0); }
public void storeName() { theName = inputField.GetComponent <Text>().text; textDisplay.GetComponent <Text>().text = "" + theName; #if !UNITY_EDITOR Highscores.AddNewHighscore(theName, Score.Points); #endif if (dontDestroy != null) { dontDestroy.setActiveCanvas = true; } SceneManager.LoadScene(0); }
public void GoTo2(string SceneName) { if (GetSceneName() == "3") { Highscores.AddNewHighscore(name.text, Global.score); } if (SceneName == "Menu") { Global.score = 0; Global.health = 100; } SceneManager.LoadScene(SceneName); }
// Start is called before the first frame update // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Space)) { int score = Random.Range(0, 1000); string username = ""; string alphabet = "abcdefghilmnopqrstuvz"; for (int i = 0; i < Random.Range(5, 10); i++) { username += alphabet[Random.Range(0, alphabet.Length)]; } Highscores.AddNewHighscore(username, score); } }