示例#1
0
        public Beatmap GetBeatmap(string diffPath)
        {
            var fileContent = File.ReadLines(diffPath).ToList();
            var osbReader   = new OsbReader();
            var storyboard  = osbReader.GetDiffStoryboard(fileContent);

            storyboard.FilePath = diffPath;

            var beatmap = new Beatmap()
            {
                Storyboard = storyboard,
            };

            return(beatmap);
        }
示例#2
0
        public Storyboard GetStoryboard()
        {
            string filename = Directory.GetFiles(Path, "*.osb").FirstOrDefault();

            if (!string.IsNullOrEmpty(filename))
            {
                OsbReader osbReader  = new OsbReader();
                var       content    = File.ReadAllLines(System.IO.Path.Combine(Path, filename)).ToList();
                var       storyboard = osbReader.GetMainStoryboard(content);
                storyboard.FilePath = filename;

                return(storyboard);
            }
            else
            {
                return(null);
            }
        }