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); } } }
public void SetBeatmapInfo(BeatmapStoreInfo info) { if (SongNameText == null) { SongNameText = transform.Find("SongName").GetComponent <TextMeshProUGUI>(); } SongNameText.text = $"{info.RomanizedSongName}\n[{info.DifficultyName}]"; this.info = info; }
public SongSelectItem(BeatmapStoreInfo beatmapStoreInfo) { this.beatmapStoreInfo = beatmapStoreInfo; }
public void Add(BeatmapStoreInfo beatmap) { m_beatmaps.Add(beatmap); }