Fix conversion types for Catch and Mania.

This commit is contained in:
smoogipooo
2017-04-17 17:25:29 +09:00
parent 09208adf81
commit 04973ae65e
3 changed files with 6 additions and 7 deletions

View File

@ -15,9 +15,8 @@ namespace osu.Game.Beatmaps
public interface IBeatmapConverter<T> where T : HitObject
{
/// <summary>
/// The type of HitObjects that can be converted to be used for this Beatmap.
/// The types of HitObjects that can be converted to be used for this Beatmap.
/// </summary>
/// <returns></returns>
IEnumerable<Type> ValidConversionTypes { get; }
/// <summary>
@ -35,7 +34,7 @@ namespace osu.Game.Beatmaps
/// </summary>
/// <param name="converter">The Converter to use.</param>
/// <param name="beatmap">The Beatmap to check.</param>
/// <returns>Whether the Beatmap can be converted using <paramref name="converter" />.</returns>
/// <returns>Whether the Beatmap can be converted using <paramref name="converter"/>.</returns>
public static bool CanConvert<TObject>(this IBeatmapConverter<TObject> converter, Beatmap beatmap) where TObject : HitObject
=> converter.ValidConversionTypes.All(t => beatmap.HitObjects.Any(h => t.IsAssignableFrom(h.GetType())));
}