Exemple #1
0
        public static async Task <string> CreateScore(int score)
        {
            string _score = await ScoreoidClient.CreateScoreAsync(username, score);

            if (Refresh != null)
            {
                Refresh(null, EventArgs.Empty);
            }

            return(_score);
        }
Exemple #2
0
        public static async Task <Leaderboard> GetLeaderboard(string order_by, string order, int limit)
        {
            scores scores = await ScoreoidClient.GetBestScoresAsync(order_by, order, limit);

            int rank = 1;

            return(new Leaderboard(from _ in scores.items
                                   select new LeaderboardItem
            {
                Rank = rank++,
                Player = _.username,
                Score = _.scores.First().value
            }));
        }