// saves beatmap to file private void SaveRecording(string beatmapPath, string fileName) { Debug.Log("saving beatmap"); string fullPath = Path.Combine(beatmapPath, fileName); BeatmapCompressor.CompressBeatmapWithMusic(currentBuffer, fullPath); }
private void TrackPlayer_OnSongEnded(object sender, EventArgs e) { Debug.Log("ending song state"); lobbyUI.Show(); // this should be a callback in the UI prob inGame = false; if (selectedBeatmapPath != null) { Debug.Log(selectedBeatmapPath); BeatmapCompressor.DeleteTempBeatmap(selectedBeatmapPath); } if (currentConductor != null) { trackPlayer.currentBeat -= currentConductor.OnCurrentBeat; Destroy(currentConductor.gameObject); currentConductor = null; } if (currentNoteSpawner != null) { Destroy(currentNoteSpawner.gameObject); currentNoteSpawner = null; } trackPlayer.songEnded -= TrackPlayer_OnSongEnded; if (!recording) { Destroy(trackPlayer.gameObject); } }
private string RetrieveBeatmapDirectory() { string beatmapDirectoryPath = FileBrowser.GetBeatmapPathFromFileDialog(); if (beatmapDirectoryPath != null) { string unzippedBeatmapPath = BeatmapCompressor.UnzipBeatmap(beatmapDirectoryPath); return(unzippedBeatmapPath); } else { FlashMessage("no beatmap loaded"); return(null); } }