Ejemplo n.º 1
0
 public static void LoadSong(string songPath)
 {
     foreach (string file in Directory.EnumerateFiles(songPath))
     {
         if (file.EndsWith(".pmb"))
         {
             Beatmap beatmap = DeserializeBeatmap(file);
             if (beatmap == null)
             {
                 Debug.Log("Failed to load map " + file);
                 continue;
             }
             beatmap.Fix();
             BeatmapStoreInfo beatmapStoreInfo = new BeatmapStoreInfo()
             {
                 MapPath           = file,
                 SongPath          = beatmap.SongPath,
                 SongName          = beatmap.SongName,
                 RomanizedSongName = beatmap.RomanizedSongName,
                 DifficultyName    = beatmap.DifficultyName,
                 BackgroundPath    = beatmap.BackgroundPath,
                 uuid = beatmap.GetUUID()
             };
             if (Beatmaps == null)
             {
                 Beatmaps = new List <BeatmapStoreInfo>();
             }
             Beatmaps.Add(beatmapStoreInfo);
         }
     }
 }
Ejemplo n.º 2
0
    public void SetBeatmapInfo(BeatmapStoreInfo info)
    {
        if (SongNameText == null)
        {
            SongNameText = transform.Find("SongName").GetComponent <TextMeshProUGUI>();
        }
        SongNameText.text = $"{info.RomanizedSongName}\n[{info.DifficultyName}]";

        this.info = info;
    }
Ejemplo n.º 3
0
 public SongSelectItem(BeatmapStoreInfo beatmapStoreInfo)
 {
     this.beatmapStoreInfo = beatmapStoreInfo;
 }
Ejemplo n.º 4
0
 public void Add(BeatmapStoreInfo beatmap)
 {
     m_beatmaps.Add(beatmap);
 }