mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 17:13:06 +08:00
Remove unnecessary extension
This commit is contained in:
parent
b62e69d170
commit
11ef65e3e2
@ -8,7 +8,6 @@ using System.Linq;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.IO.Serialization.Converters;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
|
||||
namespace osu.Game.Beatmaps
|
||||
{
|
||||
@ -62,15 +61,4 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public new Beatmap Clone() => (Beatmap)base.Clone();
|
||||
}
|
||||
|
||||
public static class BeatmapExtensions
|
||||
{
|
||||
public static double CalculateLength(this IBeatmap b)
|
||||
{
|
||||
HitObject lastObject = b.HitObjects.LastOrDefault();
|
||||
var endTime = (lastObject as IHasEndTime)?.EndTime ?? lastObject?.StartTime ?? 0;
|
||||
|
||||
return endTime - b.HitObjects.FirstOrDefault()?.StartTime ?? 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user