Ejemplo n.º 1
0
    //uploads highscore to highsoreWriter
    public void uploadHighscore()
    {
        int    score = PlayerPrefs.GetInt("PlayerScore");
        string name  = PlayerPrefs.GetString("Username");

        Debug.Log(name);
        HighscoreEntry newEntry;

        newEntry.entryName  = name;
        newEntry.entryScore = score;

        HighScoreWriter.AddEntry(newEntry);
    }
Ejemplo n.º 2
0
    //Loads highscores from file and updates UI
    private void OnEnable()
    {
        HighscoreSaveData savedScores = HighScoreWriter.GetSavedScores();

        UpdateUI(savedScores);
    }