Beispiel #1
0
    public IEnumerator setupHighScorePanel(float time)
    {
        int rank = checkIfHighScore(time);

        if (rank != -1)
        {
            inputPanel.gameObject.SetActive(true);

            yield return(new WaitUntil(() => inputPanel.isFinishedInput()));

            //Get the name of the profile and then remove the input panel
            string name = inputPanel.inputField.text;
            inputPanel.disable();

            ScoreProfile newProfile = new ScoreProfile(name, time);
            insertNewRank(newProfile, rank);

            //Save the new highscore table
            GameData.saveData <ScoreProfile>(scoreProfiles);

            updateUI();
        }
    }