public Leaderboard CreateNewLeaderboard()
    {
        Leaderboard newLeaderboard = new Leaderboard();

        newLeaderboard.AddEntry(new LeaderboardEntry("Erika", 10, 10));
        newLeaderboard.AddEntry(new LeaderboardEntry("Inken", 11, 10));
        newLeaderboard.AddEntry(new LeaderboardEntry("Selima", 5, 10));
        newLeaderboard.AddEntry(new LeaderboardEntry("Stimona", 7, 10));
        newLeaderboard.AddEntry(new LeaderboardEntry("Tristan", 8, 10));
        return(newLeaderboard);
    }
예제 #2
0
    public void SetupLeaderboard()
    {
        //Reset player location to starting checkpoint.
        ResetStartLocation();
        leaderboard.AddEntry(new LeaderboardEntry(
                                 PlayerPrefs.GetString(GeneralVariables.PlayerName),
                                 PlayerPrefs.GetInt(GeneralVariables.PlayerAge),
                                 (int)scoreTracker.GetCurrentScore()));
        leaderboard.SortLeaderboard();
        leaderboardSerializer.SerializeLeaderboard(leaderboard);

        leaderboardSetup.SetPlayerName();
        leaderboardSetup.SetLeaderboardNames(leaderboard.GetLeaderboardNames());
        leaderboardSetup.SetLeaderboardScores(leaderboard.GetLeaderboardScores());
        leaderboardSetup.SetLeaderboardAges(leaderboard.GetLeaderboardAges());
    }