Rename decoder

This commit is contained in:
smoogipoo
2017-12-21 14:19:25 +09:00
parent bfa4f1a2c3
commit e8e5e8270b
3 changed files with 6 additions and 6 deletions

View File

@ -0,0 +1,35 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.IO;
using osu.Game.IO.Serialization;
using osu.Game.Storyboards;
namespace osu.Game.Beatmaps.Formats
{
public class JsonBeatmapDecoder : Decoder
{
public static void Register()
{
AddDecoder<JsonBeatmapDecoder>("{");
}
public override Decoder GetStoryboardDecoder() => this;
protected override void ParseBeatmap(StreamReader stream, Beatmap beatmap)
{
stream.BaseStream.Position = 0;
stream.DiscardBufferedData();
stream.ReadToEnd().DeserializeInto(beatmap);
foreach (var hitObject in beatmap.HitObjects)
hitObject.ApplyDefaults(beatmap.ControlPointInfo, beatmap.BeatmapInfo.BaseDifficulty);
}
protected override void ParseStoryboard(StreamReader stream, Storyboard storyboard)
{
// throw new System.NotImplementedException();
}
}
}