public void CreateScoreEntry(string userName) //this manipuates the scoreboard on the left { namePrompt.SetActive(false); var enteredName = userName; //enteredName was old variable used from video which had user input name after game over. customized to use login name scoreboard.AddEntry(new ScoreboardEntryData() { entry_name = enteredName, entry_score = score }); }
public void SaveScore() { var entry = new ScoreboardDataEntry { entryName = nameInput.text, entryScore = GameMaster.Instance.PlayerScore }; _scoreboard.AddEntry(entry); entryUiHolder.SetActive(false); }
public void SubmitEntry() { //Disable the results group resultsContainer.SetActive(false); //Enable the scoreboard object scoreboard.gameObject.SetActive(true); //Submit the player's score scoreboard.AddEntry(new ScoreEntryData(nameEntry.text, finalScore)); //Disable the mouse and lock the cursor Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; //Highlight the first button on the scoreboard screen eventSystem.SetSelectedGameObject(firstScoreboardObject); }