2016-10-13 09:10:15 +08:00
|
|
|
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
2016-11-14 17:54:24 +08:00
|
|
|
|
using osu.Game.Modes.Objects;
|
|
|
|
|
using osu.Game.Modes.Osu.Objects;
|
2016-10-13 09:10:15 +08:00
|
|
|
|
|
2016-11-14 17:54:24 +08:00
|
|
|
|
namespace osu.Game.Modes.Taiko.Objects
|
2016-10-13 09:10:15 +08:00
|
|
|
|
{
|
|
|
|
|
class TaikoConverter : HitObjectConverter<TaikoBaseHit>
|
|
|
|
|
{
|
|
|
|
|
public override List<TaikoBaseHit> Convert(List<HitObject> input)
|
|
|
|
|
{
|
|
|
|
|
List<TaikoBaseHit> output = new List<TaikoBaseHit>();
|
|
|
|
|
|
|
|
|
|
foreach (HitObject i in input)
|
|
|
|
|
{
|
|
|
|
|
TaikoBaseHit h = i as TaikoBaseHit;
|
|
|
|
|
|
|
|
|
|
if (h == null)
|
|
|
|
|
{
|
|
|
|
|
OsuBaseHit o = i as OsuBaseHit;
|
|
|
|
|
|
2016-10-13 20:53:42 +08:00
|
|
|
|
if (o == null) throw new HitObjectConvertException(@"Taiko", i);
|
2016-10-13 09:10:15 +08:00
|
|
|
|
|
|
|
|
|
h = new TaikoBaseHit
|
|
|
|
|
{
|
|
|
|
|
StartTime = o.StartTime,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output.Add(h);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return output;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|