CacheableDownloadHandlerScoreSaberData.cs 946 B

123456789101112131415161718192021222324252627282930313233
  1. using Mobcast.Coffee.AssetSystem;
  2. using UnityEngine.Networking;
  3. namespace SongBrowser.DataAccess.Network
  4. {
  5. /// <summary>
  6. /// Cacheable download handler for score saber tsv file.
  7. /// </summary>
  8. public class CacheableDownloadHandlerScoreSaberData : CacheableDownloadHandler
  9. {
  10. ScoreSaberDataFile _scoreSaberDataFile;
  11. public CacheableDownloadHandlerScoreSaberData(UnityWebRequest www, byte[] preallocateBuffer)
  12. : base(www, preallocateBuffer)
  13. {
  14. }
  15. /// <summary>
  16. /// Returns the downloaded score saber data file, or null.
  17. /// </summary>
  18. public ScoreSaberDataFile ScoreSaberDataFile
  19. {
  20. get
  21. {
  22. if (_scoreSaberDataFile == null)
  23. {
  24. _scoreSaberDataFile = new ScoreSaberDataFile(GetData());
  25. }
  26. return _scoreSaberDataFile;
  27. }
  28. }
  29. }
  30. }