protected override APIRequest FetchScores(Action <IEnumerable <APIRoomScoreInfo> > scoresCallback) { var scores = Enumerable.Range(0, 50).Select(createRoomScore).ToArray(); scoresCallback?.Invoke(scores); ScoresLoaded?.Invoke(scores); return(null); }
public void GetScoresAsync(string chapter, int level) { try { var t = new Task(() => { var result = FireBaseReader.ReadAsync <LevelScoreEntry>(FireBaseSavePaths.ScoreLocation(chapter, level + 1)); ScoresLoaded?.Invoke(result.Result); }); t.Start(); } catch (Exception ex) { DebugLogger.Instance.WriteException(ex); } }