コード例 #1
0
 public async Task <Highscore> GetHighscore(string world, HighscoreType type, Vocation vocation)
 {
     return(await _highscoreService.Get(world, type, vocation));
 }
コード例 #2
0
ファイル: Enums.cs プロジェクト: pawelekplaza/TibiaCharInfo
 public static string GetProperString(this HighscoreType type)
 => type.ToString().ToLower();
コード例 #3
0
        public async Task <Highscore> Get(string world, HighscoreType type)
        {
            var response = await GetResponse($"{ _baseUri }{ world }//{ type.GetProperString() }.json");

            return(JsonConvert.DeserializeObject <HighscoreResponse>(response).Highscores);
        }
コード例 #4
0
        public async Task <Highscore> Get(string world, HighscoreType type, Vocation vocation)
        {
            var response = await GetResponse($"{ _baseUri }{ world }//{ type.ToString() }//{ vocation.GetQueryString() }.json");

            return(JsonConvert.DeserializeObject <HighscoreResponse>(response).Highscores);
        }
コード例 #5
0
 private void AddAnimationEntry(Queue <ScoreData> animationQueue, HighscoreType highscoreType, float scoreMultiplier, int scoreValue)
 {
     highscoreEntries[highscoreType].scoreMultiplier = scoreMultiplier;
     highscoreEntries[highscoreType].scoreValue      = scoreValue;
     animationQueue.Enqueue(highscoreEntries[highscoreType]);
 }